jib icon indicating copy to clipboard operation
jib copied to clipboard

Change scope of Maven core artifacts to provided

Open rquinio opened this issue 1 year ago • 3 comments

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

rquinio avatar May 30 '23 22:05 rquinio

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

rquinio avatar Jun 03 '23 11:06 rquinio

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Jun 03 '23 11:06 sonarqubecloud[bot]

mainteners - kindly ping about review and merge

slawekjaranowski avatar Sep 19 '23 08:09 slawekjaranowski