jib
jib copied to clipboard
Change scope of Maven core artifacts to provided
Fixes #4019 Fixes #4033
Maven 3.9.2 now warnin about plugins that have Maven core dependencies in their runtime classpath.
The change will require a release of jib-maven-plugin-extension-api, before releasing jib-maven-plugin.
Locally I had to use a 0.4.1-SNAPSHOT and mavenLocal()
(cf #3973).
Declare explicitly dependency maven-shared-utils for org.apache.maven.shared.utils.Os (used to be transitive).
Tested via mvn clean install -f examples/helloworld/ -Dmaven.plugin.validation=VERBOSE
, the warnings are gone with jib-maven-plugin:3.3.3-SNAPSHOT
I noticed that Gradle publications completely ignores compileOnly
dependencies: they don't appear in the resulting pom.xml.
It seems a better practice to keep the declaration as provided, in case of incompatible changes in a future version of Maven.
So I've used the workaround explained here: https://stackoverflow.com/questions/47455551/how-map-gradle-compileonly-to-provided-in-generated-pom-generatepom
mainteners - kindly ping about review and merge