groovy / GMavenPlus

A rewrite of GMaven, a Maven plugin for Groovy
Other
285 stars 35 forks source link

Maven 3.9.2 validation warnings #239

Closed ascopes closed 1 year ago

ascopes commented 1 year ago

Running this plugin with MAVEN_OPTS="-Dmaven.plugin.validation=verbose on Maven 3.9 2 raises the following warning:

[WARNING]  * org.codehaus.gmavenplus:gmavenplus-plugin:2.1.0
[WARNING]   Declared at location(s):
[WARNING]    * <project using the plugin>
[WARNING]   Plugin issue(s):
[WARNING]    * Plugin should declare these Maven artifacts in `provided` scope: [org.apache.maven:maven-settings-builder:3.0, org.apache.maven:maven-repository-metadata:3.0, org.apache.maven:maven-artifact:3.0, org.apache.maven:maven-plugin-api:3.0, org.apache.maven:maven-settings:3.0, org.apache.maven:maven-compat:3.0, org.apache.maven:maven-aether-provider:3.0, org.apache.maven:maven-model:3.0, org.apache.maven:maven-core:3.0, org.apache.maven:maven-model-builder:3.0]

This results in build warnings if using this plugin in any Maven project on the newest version of Maven.

Looks like the plugin pom.xml needs to mark the following with <scope>provided</scope>

hazendaz commented 1 year ago

I'm raising a PR in a few minutes for this.

hazendaz commented 1 year ago

currently a fix is open in #240

keeganwitt commented 1 year ago

Thanks for this!

hazendaz commented 1 year ago

@keeganwitt How soon would it be possible to get a release? I manage a larger super pom and trying to square away all the lose ends if possible as soon as possible. That isn't to say all plugins will make the cut. Maven just happened to get way more noisy even before they were ready. This one I use pretty heavily so it shows on practically all our builds (~2k).

keeganwitt commented 1 year ago

I was thinking of doing a snapshot release in the next day or two to verify the fix first. Then releasing later this week.

keeganwitt commented 1 year ago

Opened #243 to clean up two other validations it complained about.

keeganwitt commented 1 year ago

The warning

[WARNING]  * org.codehaus.gmavenplus:gmavenplus-plugin:3.0.0-SNAPSHOT
[WARNING]   Plugin issue(s):
[WARNING]    * Plugin depends on the deprecated Maven 2.x compatibility layer, which may not be supported in Maven 4.x

Will be a little trickier to get rid of. It comes from org.apache.maven.shared:file-management:3.0.0. I think 3.1.0 can get rid of it, but new FileSetManager(getLog()) doesn't work because it requires an SLF4J logger, not a Maven logger. I haven't yet figured out how to integrate SLF4J in (even upgrading the minimum Maven version to 3.2.5 didn't do it).

hazendaz commented 1 year ago

@keeganwitt Went along those lines with PR #246

keeganwitt commented 1 year ago

Thanks! The validation now reports clean in all the integration tests.