I have recently become curious about open source licenses. I have a question about the LGPL. I created a Java web project and built it as a WAR package. Can I add LGPL jars to this WAR file?

  • AFAIK as long as you use the LGPL API without making any modifications to the library, your work won't be considered as derivative work, and thus you can release it under any terms. There are other requirements particularly when you redistribute the library with your code so if you plan to distribute your code, you should make sure you follow the terms of the actual license. Jan 4, 2012 at 7:26

1 Answer 1


Warning: I am not a lawyer. If you need legally sound advice, always ask a lawyer. In this case, ask a lawyer who understands open source licensing.

The following is a summary:

  • If you don't distribute the WAR file to anyone else, then LGPL places no restrictions on what you do with the library.

  • If you do distribute the WAR file to someone else, you have two options:

    1. Release your source code under a license that is compatible with the GPL or LGPL, OR ...

    2. Use the LGPL'ed libraries in your code without modifying the libraries, AND without linking or incorporating the libraries into your code in a way that prevents the recipient from replacing them with a modified copy of the libraries.

(Assuming that the library in question is Java, option 2 means that you have to use the library JAR file as-is. Don't add your own customizations / fixes, don't change class or package names (etc), don't add classes, and don't merge it with your own JAR files.)

For more information, please refer to the GNU Lesser Public License page.

  • 1
    If customization is needed, he can do it, but then must release modified library under LGPL. Noone else probubly will not find it usefull, other versions of original library will not be possible to use, but other version of his modified library (eg. user repairing bug in it) will be usable and that is what he is using.
    – user470365
    Jan 4, 2012 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.