-
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
Add scope+include/exclude support in mojo #1408
Comments
@rmannibucau Jib resolves dependencies using |
Yes,
At the end it can be solved by duplicating poms but since it is 1. common in mbn plugin and 2. as trivial as a filter in a stream, i really think it is worth adding it built in. Workatound is indeed to use jib core in a main and run it with mvn exec plugin. |
@rmannibucau Jib doesn't package I think we'd need a real use case where either the existing constructs cannot work or where using the existing constructs leads to an undesirable situation. |
Yep, your proposal is basically the not desired duplication of the poms. My use case is for a pluggable system (a bit like OSGi) where depending the environment the deps are not exactly the same. I use maven to resolve them all and i'd like jib executions to have different includes/excludes. For now I did it customizing my layers with jib programamtically but having it built-in would be nicer. |
|
You don't need to duplicate poms. The usual way is to create multiple Maven profiles ( Otherwise, when it comes to the built-in filtering support, I think we can close this as a dup in favor of others for supporting fine-grained control over dependencies and layers. See #1962 (comment) We expect to support the generalized fined-grained dependency control through the Jib extension framework: #1962 (comment) |
For reference profiles is not an option cause it requires rebuilds and is not release compatible whereas multiplying artificially modules work but slows down the build with no gain (why bypassing jib plugin to use core programmatically is saner). |
As promised, the Jib Extension Framework is now available with the latest Jib versions. You can easily extend and tailor the Jib plugins behavior to your liking. We've written a general-purpose layer-filter extension that enables fine-grained layer control, including deleting files and moving files into new layers. The extension will cover your use-case to filter unwanted dependencies (or any files). For general information about using and writing extensions, take a look at the Jib Extensions repo. |
Description of the issue:
all dependencies of the mojo are added to the images
Expected behavior:
dependencies should be filterable, common way for maven is
g:a:v[:t:c]
)The text was updated successfully, but these errors were encountered: