You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Michael Osipov <mi...@apache.org> on 2016/12/15 21:49:32 UTC

Commits 02795b21e753bdd4eddd7e9ebee9f50315bc0e24 and 3681fd8489cd59d0c5bc49ef38725b655d524301

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-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Commits 02795b21e753bdd4eddd7e9ebee9f50315bc0e24 and 3681fd8489cd59d0c5bc49ef38725b655d524301

Posted by Christian Schulte <cs...@schulte.it>.
We first need to decide on the version this will get released as.
Updating everything to 3.4 now and to 4.0 two weeks later I can avoid
the duplicate effort this time.


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


Re: Commits 02795b21e753bdd4eddd7e9ebee9f50315bc0e24 and 3681fd8489cd59d0c5bc49ef38725b655d524301

Posted by Christian Schulte <cs...@schulte.it>.
Am 12/16/16 um 21:36 schrieb Michael Osipov:
> Am 2016-12-16 um 18:41 schrieb Christian Schulte:
>> Am 12/15/16 um 22:49 schrieb Michael Osipov:
>>> 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?
>>
>> Seems this had been planned to be done in Maven 3.1 during development
>> of Maven 3.0 but then has never been done. I just kept the constants
>> that way. We could update all of that to 3.4 so you never see any
>> reference to 3.1 anymore. Is it that what you find confusion or is it
>> the error you would like to be kept a warning?
> 
> The former, the warning to error tranformation is fine though.
> Leave 31 as is and introduce 34 and update all referencing code 
> accordingly. This will avoid confusion if someone searches through the 
> source code.
> 

Ok. Will do that.


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


Re: Commits 02795b21e753bdd4eddd7e9ebee9f50315bc0e24 and 3681fd8489cd59d0c5bc49ef38725b655d524301

Posted by Michael Osipov <mi...@apache.org>.
Am 2016-12-16 um 18:41 schrieb Christian Schulte:
> Am 12/15/16 um 22:49 schrieb Michael Osipov:
>> 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?
>
> Seems this had been planned to be done in Maven 3.1 during development
> of Maven 3.0 but then has never been done. I just kept the constants
> that way. We could update all of that to 3.4 so you never see any
> reference to 3.1 anymore. Is it that what you find confusion or is it
> the error you would like to be kept a warning?

The former, the warning to error tranformation is fine though.
Leave 31 as is and introduce 34 and update all referencing code 
accordingly. This will avoid confusion if someone searches through the 
source code.

Michael


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


Re: Commits 02795b21e753bdd4eddd7e9ebee9f50315bc0e24 and 3681fd8489cd59d0c5bc49ef38725b655d524301

Posted by Christian Schulte <cs...@schulte.it>.
Am 12/15/16 um 22:49 schrieb Michael Osipov:
> 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?

Seems this had been planned to be done in Maven 3.1 during development
of Maven 3.0 but then has never been done. I just kept the constants
that way. We could update all of that to 3.4 so you never see any
reference to 3.1 anymore. Is it that what you find confusion or is it
the error you would like to be kept a warning?


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


Re: Commits 02795b21e753bdd4eddd7e9ebee9f50315bc0e24 and 3681fd8489cd59d0c5bc49ef38725b655d524301

Posted by Christian Schulte <cs...@schulte.it>.
First commit is not relevant to the increase of the validation level,
BTW. Just the second one.


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