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

+4 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.

ago by
edited ago by
Just encountered this:

>  Execution error (ExceptionInfo) at clojure.tools.build.tasks.uber/explode1 (uber.clj:165).
>  Cannot write META-INF/license/LICENSE.lzma-java.txt from io.netty/netty-codec-native-quic$osx-aarch_64 as parent dir is a file
> from another lib. One of them must be excluded.
ago by
This really isn't an answer -- consider posting it as a comment on the original question, and deleting your answer (if you can).
ago by
edited ago by
-------------
ago by
I tried deleting the answer, but there doesn't seem to be a way to do that — but it is possible to convert it into a comment, which I did. Now I'm trying to delete the duplicate comment I created in the meantime… sorry about the mess.

Please log in or register to answer this question.

...