Hi,

I have tried Maven 3.4.0-SNAPSHOT on an in-house project today where the build has failed with a POM validation error telling me that I have duplicate plugin declaration. I have traced the issue down to DefaultModelValidator#validate20RawPlugins() but did not understand that either because it says:

Severity errOn31 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 );

but Maven upto 3.3.9 just emits a warning on my project. Some git blame and logging showed me the two mentioned commits where the validation level was raised from 3_0 to 3_1 beginning with Maven 3.4 in ModelBuildingRequest.

How can this actually be? This commit is highly misleading and error-prone. A user would seek the error with the DefaultModelValidator which hasn't changed in this case. Ultimately, they will be confused completely.

I would expect a VALIDATION_LEVEL_MAVEN_3_4 with VALIDATION_LEVEL_STRICT = VALIDATION_LEVEL_MAVEN_3_1. All spots which say Severity errOn31 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_1 ); must be turned into Severity errOn34 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_4 ); because 3_1 has never been enforced starting with 3.1.

Christian, can you have a look and cleanup accordingly?

Thanks,

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to