Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assemble can fail every time #7

Open
Vaelatern opened this issue Apr 23, 2021 · 4 comments
Open

Assemble can fail every time #7

Vaelatern opened this issue Apr 23, 2021 · 4 comments

Comments

@Vaelatern
Copy link

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.

@sunng87
Copy link
Owner

sunng87 commented Apr 24, 2021

Thanks for your investigation. Could you please send a pull request for this?

@Vaelatern
Copy link
Author

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

@drzsda
Copy link

drzsda commented Jul 8, 2022

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants