lein-jlink
lein-jlink copied to clipboard
Assemble can fail every time
On my version of lein, 2.9.5 on Java 11.0.9, the following call ends up removing the target/image
directory.
https://github.com/sunng87/lein-jlink/blob/master/src/leiningen/jlink.clj#L139-L141 (The first two lines are useless and can be removed without ill effect).
As such, when the call is made to copy the uberjar to the target destination, on line 144, the target directory might no longer exist.
This causes problems, since the java process being used is also in the target directory (when the middleware is installed).
I'm trying to fix it for myself, will report back, but suggestions would be helpful too.
https://github.com/technomancy/leiningen/blob/master/src/leiningen/jar.clj#L339-L340
Thanks for your investigation. Could you please send a pull request for this?
I suspect it should be a documentation fix, or maybe there is a way to make sure clean
doesn't get target/image
. Since I don't have a generalizable solution yet, I'll leave this issue open and PR when I find a fix
I suspect it should be a documentation fix, or maybe there is a way to make sure
clean
doesn't gettarget/image
. Since I don't have a generalizable solution yet, I'll leave this issue open and PR when I find a fix
This is not a bug, it's a feature :). You may omit this behaviour by setting :auto-clean
value to false
for your project.clj
. Additional information here @Vaelatern @sunng87