Search code examples
javamavenlicensingexecutable-jarlgpl

Distributing executable JARs depending on LGPL code license compilantly


I got a Java project I don't want to publish under a Gnu license. (MIT, but nevermind.)

As build management tool I use Maven, that generates a “jar-with-dependencies”. The project depends on gnu.getopt, licensed under the LGPL 2.

So my questions are:

  • Am I allowed to publish that “jar-with-dependencies” under another license than the LGPL? (Say, MIT, shareware …)
  • If not: How can I distribute executable JARs depending on LGPL code?

I do not

  • look for a replacement for gnu.getopt.
  • seek for answers like “consult your lawyer”.
  • want to be converted to the Gnu way of life …

Solution

  • Haha, you don't have to be converted to the GNU way of life although I would highly recommend it :). You are in luck, the difference between the GPL and the LGPL (Lesser GPL) is that the LGPL basically allows you to do just what you are asking wheras the GPL does not. From the GNU rationale for not using the LGPL:

    The GNU Project has two principal licenses to use for libraries. One is the GNU Lesser GPL; the other is the ordinary GNU GPL. The choice of license makes a big difference: using the Lesser GPL permits use of the library in proprietary programs; using the ordinary GPL for a library makes it available only for free programs.

    GNU want to change all of their libraries to GPL eventually but, for now, if it says it uses the LGPL, you're good to go. If it had used the GNU licence, you would have to licence your software under a GNU-compliant licence. In fact, a quick search of this list reveals:

    Expat License

    This is a simple, permissive non-copyleft free software license, compatible with the GNU GPL. It is sometimes ambiguously referred to as the MIT License.

    EDIT: Remember that IANAL! I have since found that you may not be able to licence under a compatible licence when including a GPL library: What does it mean to say a license is “compatible with the GPL?”