-
Notifications
You must be signed in to change notification settings - Fork 38
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
Java plugin should not copy all jar files #893
Comments
I'm not sure how we'd do this computationally in a backwards-compatible manner. A workaround right now is to use As you mentioned using the |
Right, this would need to be addressed per-specific plugin (maven, ant, etc). I also agree with doing an opt-in for the current plugins, and a breaking change for 26.04 |
The solution is more or less clear-cut for ant (we can run dist), but with maven and gradle the line is a bit murkier - the gradle tasks/maven plugins might provide several outputs which are even conflicting with each other (e.g. plain jar with dependencies vs boot jar). The only way to resolve this is to hook into the build system itself (https://github.com/rockcrafters/java-rockcraft-plugins). |
Lets add more documentation to maven/ant and explain how to use stage keyword/dist command. |
What needs to get done
Java plugin copies all jar files found in the build output. This includes test dependencies which should not be present in the resulting image.
Java plugin is unable to distinguish between test and runtime dependencies as it is build-system specific.
We need to design a way to determine the test dependencies,.
Why it needs to get done
By default Java plugin deploys all the jar files including test dependencies.
The text was updated successfully, but these errors were encountered: