-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Do no include runtime/provided/optional maven dependencies in image #1254
Comments
The Maven docs for
Although you've marked
Which I interpret to mean that any project that depends on your project won't pull in I think you'll need to use a Maven profile if you want to exclude |
Thanks for the quick answer. And what about provided dependencies ? |
We resolve |
Closing since it sounds like things are working as intended. |
Actually I moved to fabric8io docker-maven-plugin because it uses maven-assembly-plugin syntax. It provides excludes capabilities. |
@paskos just curious how your build is now configured? |
This is a part of my config, it's not working at is is in this message but the full version is.
|
For those coming to this thread to find a way to exclude |
Description:
I am working on a spring-boot project and I have a runtime dependency on
spring-boot-devtools
that is used during development.When I build the image using
jib-maven-plugin
spring-boot-devtools
is copied in/libs
directory even if the scope is runtime.Expected:
I expected the jar to be ignored the same way spring-boot maven plugin does not include it in the fat jar.
Step to reproduce:
Create a maven project
add a dependency with runtime
configure jib-maven-plugin plugin
build and run docker image
docker exec -it /bin/bash
list the content of the libs/ directory
the runtime dependency will be in the directory
Environment:
jib-maven-plugin: version 0.10.0
OS: Mac OS X
Maven: version 3.5.4
java: version 1.8.0_181
jib-maven-plugin
Configuration:The text was updated successfully, but these errors were encountered: