[ 
https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17747001#comment-17747001
 ] 

ASF GitHub Bot commented on MNG-7851:
-------------------------------------

candrews commented on PR #1210:
URL: https://github.com/apache/maven/pull/1210#issuecomment-1649855572

   > This will very likely violate the generated XML Schema.
   
   How does it violate the schema? Can you point me to something?
   
   The result of this change is only that the error message changes - no other 
behavior changes.
   With `<modelVersion>4.0.0</modelVersion>`:
   Before:
   `'modelVersion' of '4.0' is newer than the versions supported by this 
version of Maven: [4.0.0]. Building this project requires a newer version of 
Maven.`
   With this PR:
   `'modelVersion' must be one of [4.0.0] but is '4.0'.`
   
   In this PR, I added a unit test that demonstrates this change in error 
messaging behavior for this situation.
   
   > Moreover, the validator prints a hard version. I consider this change 
wrong.
   
   I'm sorry, I don't understand... Can you please clarify, perhaps with an 
example?
   
   




> Error message when modelVersion is 4.0 is confusing
> ---------------------------------------------------
>
>                 Key: MNG-7851
>                 URL: https://issues.apache.org/jira/browse/MNG-7851
>             Project: Maven
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.9.3
>            Reporter: Craig
>            Priority: Minor
>
> When a pom with modelVersion 4.0 is referenced, such as this one:
> {code:xml}
> <project>
>   <modelVersion>4.0</modelVersion>
>   <groupId>foo</groupId>
>   <artifactId>bar</artifactId>
>   <version>0.1</version>
> </project>
> {code}
> The error message is:
> {{'modelVersion' of '4.0' is newer than the versions supported by this 
> version of Maven: [4.0.0]. Building this project requires a newer version of 
> Maven.}}
>  
> That's misleading.
> A better error message would be:
> {{'modelVersion' must be one of [4.0.0] but is '4.0'.}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to