Skip to content
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

Maven 3.9.2 validation warnings #239

Closed
ascopes opened this issue May 15, 2023 · 9 comments
Closed

Maven 3.9.2 validation warnings #239

ascopes opened this issue May 15, 2023 · 9 comments
Assignees
Milestone

Comments

@ascopes
Copy link

ascopes commented May 15, 2023

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>

  • 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
@hazendaz
Copy link
Contributor

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

@hazendaz
Copy link
Contributor

currently a fix is open in #240

@keeganwitt
Copy link
Member

Thanks for this!

@hazendaz
Copy link
Contributor

@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
Copy link
Member

keeganwitt commented May 17, 2023

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
Copy link
Member

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

@keeganwitt keeganwitt added this to the 3.0.0 milestone May 17, 2023
@keeganwitt
Copy link
Member

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
Copy link
Contributor

@keeganwitt Went along those lines with PR #246

@keeganwitt
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants