Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am thinking of releasing libraries and frameworks which I have written in Java to other developers.

I've spent a lot of time researching what open source licenses are available, and the differences between them, however some advice from real people specifically on this matter would be nice.

Basically, I want something that is..

.. easy to understand for other developers

.. it's ok for developers to use and modify the code as they wish

.. keep my copyright notice in the source code, even though the code gets modified and/or redistributed

.. No need to put my copyright notice on the final product in any way, only in the source code as mentioned above

.. it's ok to use the framework in a commercial solution, without forcing the commercial solution to be open source as well (for example if Microsoft Windows would use my library, it wouldn't force Microsoft to release Windows as open source)

.. You are not allowed to sell the libraries or framework alone (however it is ok to bundle it in your own commercial solution, as mentioned above)

.. includes basic "as in" warranty

Three questions:

1) Are there any other important license topics that could be good for a library/framework?

2) Which open source license should I pick and why? (I assume the candidates are MIT, GPL and LGLP)

3) With the license, is it ok to distribute the binaries alone (without the source code, to minimize size) or does that go against the "open source" idea?

share|improve this question

closed as too broad by gnat, MichaelT, mattnz, GlenH7, Bart van Ingen Schenau Aug 25 '13 at 18:04

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

I don't know much about open source licenses but I'd stay away from the ones that say that even if you don't distribute the application (e.g. it's a web application people log into), by using the library you must open source your entire app. Those frustrate the hell out of me. – Wayne M Jun 6 '11 at 14:22
These days patents are nasty. Look at the Apache license too. – user1249 Jun 6 '11 at 14:23
up vote 5 down vote accepted

The MIT license would be OK, except for this clause:

You are not allowed to sell the libraries or framework alone (however it is ok to bundle it in your own commercial solution, as mentioned above)

MIT doesn't provide this restriction, and neither do the others you mention, and I don't see why you want it.

And the whole point about open source is that you get the source!

share|improve this answer
Does that mean that frameworks cannot be distributed without the source? I mean, the source is available to download, but just isn't packaged in a "production version". Is that wrong? – corgrath Jun 6 '11 at 14:41
No, you can have a binary-only distribution, so long as the source is available to your licensees. – nbt Jun 6 '11 at 14:54

Such a license cannot possibly exist, since your restriction #6 violates article 8 of the Open Source Definition.

8. License Must Not Be Specific to a Product

The rights attached to the program must not depend on the program's being part of a particular software distribution. If the program is extracted from that distribution and used or distributed within the terms of the program's license, all parties to whom the program is redistributed should have the same rights as those that are granted in conjunction with the original software distribution.

share|improve this answer
Is that requirement so far fetched? So if someone releases A under the MIT license, its ok that I sell A as a stand alone product? – corgrath Jun 6 '11 at 14:38
Yes. If product A is released under the MIT license, you will only be able to sell it for a considerable profit if you add some kind of value - convenience, support, features, warranty, anything. If you don't add anything, people will just download the free (as in beer) version. This is why most Open Source licenses are fairly generous in this regard. – tdammers Jun 6 '11 at 14:43
How will the customer know it can be downloaded free from somewhere else? What in the MIT license displays that information to the customer? – corgrath Jun 6 '11 at 14:48
@corgrath Common sense? Google? – nbt Jun 6 '11 at 14:55

Take a look at this list from Eric S. Raymond:

Personally, I like the BSD license for its brevity and clarity, but it is one of the most liberal licenses of the bunch, so it might not fit your needs.

In any case, you probably want to avoid the GPL family of licenses, unless you are religious about converting the whole world to Open Source.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.