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 ability to read custom layers.xml from classpath #32466
Comments
It doesn't appear to be that common for Maven plugins to offer file and classpath resolution on the same property so I'm not sure what format we'd use to support this. The obvious solution is to use Spring's resource abstraction and support the @juanpablo-santos What's driving this request? Have you often found you need use the same layers configuration in multiple apps? |
Looking at the maven assembly plugin it has this notion of "named" descriptor you can put on the classpath and reuse, see https://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html |
Hi @philwebb, @snicoll thanks for the insights, we have two use cases for this:
having the option to instruct the spring-boot maven plugin to take a file from classpath would ease the reuse of a shared layers.xml file, without invoking other plugins, which wastes a small amount of time (grab from the repo, unpack file) and adds some configuration to one of the built modules. Our workaround was to use the remote-resources plugin, which is similar to the shared descriptor from the assembly plugin, but we were hoping to avoid the need of invoking yet another plugin. Either having a separate argument, understood only if the configuration parameter isn't set, or look into Regarding the |
👍 We also have a multi-module Maven project. We need a separate layer for our own dependencies to reduce Docker image size. We would love to provide a default layers.xml for this in some common dependency, otherwise we would need to include the same layers.xml for every project, which is cumbersome. |
Currently, it is possible to provide a custom layers.xml file to the maven plugin, but it seems to be read with a
FileInputStream
, so only file references are understood. It would be nice if the file could also be read from classpath (i.e., via plugin dependency).The text was updated successfully, but these errors were encountered: