Welcome! Please see the About page for a little more info on how this works.

+3 votes
in tools.build by

Following on from https://ask.clojure.org/index.php/10854/getting-an-error-with-tools-build-uberjar?show=10854#q10854

Jars are case-sensitive. This means that an uberjar can have a file named license and LICENSE/epl.txt simultaneously inside them. But if you explode these to disk when building an uberjar in a file system that is case-sensitive (in particular, OSX), you can an error along the lines of

Execution error (ExceptionInfo) at clojure.tools.build.tasks.uber/explode1 (uber.clj:166).
Cannot write META-INF/license/LICENSE.aix-netbsd.txt from io.grpc/grpc-netty-shaded as parent dir is a file from another lib. One of them must be excluded.

The solution to this is to track down the conflicting files and add them to exclusions. But often this can be tedious if the single file you want ot exclude license exists and the error message is about one of several files that conflicts LICENSE/epl.txt.

The error is annoying also because these files can sit together just fine in an uberjar, but not in their temporary location on disk. It would be nice if the uberjar could just pull files from each jar rather than copy them onto disk in an intermediate step.

Please log in or register to answer this question.

...