swagger-codegen-tooling icon indicating copy to clipboard operation
swagger-codegen-tooling copied to clipboard

maven.plugin.validation warnings

Open msymons opened this issue 2 years ago • 0 comments

Building a project using Maven 3.9.x will generate plugin validation [WARNING] log entries. These a intended to help spot problems that plugins might run into when Maven 4.x is released.

When using 'maven.plugin.validation' property with value "verbose", we see:

Plugin validation issues were detected in x plugin(s)

* org.zalando.maven.plugins:swagger-codegen-maven-plugin:0.4.38
 Declared at location(s):
  * XXX
 Used in module(s):
  * YYY
 Plugin issue(s):
* Plugin is a Maven 2.x plugin, which will be not supported in Maven 4.x
* Plugin mixes multiple Maven versions: [2.0, 2.0.7, 3.2.1]
* Plugin should declare these Maven artifacts in `provided` scope: [org.apache.maven:maven-settings:3.2.1, org.apache.maven:maven-model-builder:3.2.1, org.apache.maven:maven-model:3.2.1, org.apache.maven:maven-settings-builder:3.2.1, org.apache.maven:maven-artifact:3.2.1, org.apache.maven:maven-plugin-api:3.2.1, org.apache.maven:maven-core:3.2.1, org.apache.maven:maven-repository-metadata:3.2.1, org.apache.maven:maven-aether-provider:3.2.1]
* Plugin depends on plexus-container-default, which is EOL

The advise from Maven devs is:

Do not rely on maven-compat, as if you do, it means your plugin is technically a Maven2 plugin (as you depend on Maven3's Maven2 compatibility layer)

msymons avatar Jun 19 '23 13:06 msymons