tools-build

Bastian 2023-04-06T15:22:13.803879Z

Hi! I'm getting an exception when building an uber jar in windows using the default conflict handler (:append-dedupe) for LICENSE files, also with :append. It works well :warn. Here is the error message: Execution error (FileNotFoundException) at http://java.io.FileOutputStream/open0 (FileOutputStream.java:-2). C:\Users\B\AppData\Local\Temp\uber11859840574852522667\LICENSE (Zugriff verweigert) Zugriff verweigert = Access Denied (I also tried it with adminstrator privileges, so this does not seem the problem) I am using io.github.clojure/tools.build {:git/tag "v0.9.4" :git/sha "76b78fe"} Thanks for any ideas.

borkdude 2023-04-06T15:43:58.849599Z

@sibuna After this failure, does C:\Users\B\AppData\Local\Temp\uber11859840574852522667\LICENSE exist on disk?

seancorfield 2023-04-06T15:55:34.246689Z

It's most likely due to one dependency jar having a file called license and one having a directory called license. The solution is to add an exclusion on license. This comes up fairly often here so you should be able to search this channel for license to find details (I'm in my phone right now).

👍 1
Bastian 2023-04-06T16:02:35.448129Z

thanks for your fast answers! I'll look through the channel. I am fairly new to clojure and it cost me some time to even figure out the conflict handler as a culprit, would be nice to have a more verbose error message 🙂 (the file does not exist after building)

seancorfield 2023-04-06T16:10:03.626889Z

This conflict happens less on Linux because the directory tends to be license and the file tends to be LICENSE, but it can happen easily on macOS/Windows where the filesystem is not case-sensitive. I'm at my desk now so if you're still looking for the exact config needed, I can probably find it pretty quickly now... 🙂

👍 1
Bastian 2023-04-06T16:12:07.613229Z

i found it, thanks again for your time!

👍🏻 1
seancorfield 2023-04-06T16:12:26.735279Z

Uberjar building OK now?

Bastian 2023-04-06T16:21:35.810389Z

yes, using :exclude with a regex matching the LICENSE worked.

🎉 1
Bastian 2023-04-06T16:21:58.080099Z

small steps 🙂