My closed-source java project uses dependencies with Apache License (Apache Commons etc.). The license permits it fully to my understanding.

The problem is, that because of some technical decisions, the delivery version is shaded, producing a single target jar.

Do such a jar constitutes a 'derivative product', or it is considered static linking, as long as the package structure is unaffected?

How should I handle the licenses? In most libraries, it's META-INF/LICENSE.txt, and it's overwritten by shade.

1 Answer 1


Regardless of technologies you use for distribution, you must comply with the license. The Apache license requires that you include a copy the license text + NOTICE file with your software. The appropriate mechanism for this could be the JAR's META-INF system, but it might be more appropriate to (additionally) put copies into your software's documentation or an integrated help system. If the previous LICENSE file is overwritten, you should perhaps add the original licenses back explicitly.

As a rule of thumb: wherever you assert your own copyright (license files, splash screens), you should also mention third-party copyright in bundled software.

When shading Apache-2.0 licensed dependencies, you are modifying these dependencies and are additionally required to add “prominent notices” to this effect, see clause 4(b).

Since your JAR contains the libraries, the JAR can reasonably be understood as a derivative work of all the libraries and your own code, regardless of static vs dynamic linking discussions (that likely have no legal relevance anyway). An alternative view would be that a JAR is just a ZIP archive that contains different libraries alongside each other. However, that would not free you from having to comply with the Apache license – you would still have to include the license + notices. For Apache, your obligations are pretty much the same in either case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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