[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17759925#comment-17759925 ] ASF GitHub Bot commented on MNG-7851: - gnodet merged PR #1219: URL: https://github.com/apache/maven/pull/1219 > 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 >Assignee: Guillaume Nodet >Priority: Minor > Fix For: 4.0.0-alpha-8, 3.9.5 > > > When a pom with modelVersion 4.0 is referenced, such as this one: > {code:xml} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17759896#comment-17759896 ] ASF GitHub Bot commented on MNG-7851: - gnodet merged PR #1210: URL: https://github.com/apache/maven/pull/1210 > 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 >Assignee: Guillaume Nodet >Priority: Minor > Fix For: 4.0.0-alpha-8, 3.9.5 > > > When a pom with modelVersion 4.0 is referenced, such as this one: > {code:xml} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17759895#comment-17759895 ] ASF GitHub Bot commented on MNG-7851: - gnodet opened a new pull request, #1219: URL: https://github.com/apache/maven/pull/1219 Improve DefaultModelValidator.compareModelVersions to be able to compare versions which different numbers of segments, allowing it to compare "4", "4.0", and "4.0.0" to each other for example. Signed-off-by: Craig Andrews # Conflicts: # maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java Following this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MNG) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[MNG-XXX] SUMMARY`, where you replace `MNG-XXX` and `SUMMARY` with the appropriate JIRA issue. - [ ] Also format the first line of the commit message like `[MNG-XXX] SUMMARY`. Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] You have run the [Core IT][core-its] successfully. If your pull request is about ~20 lines of code you don't need to sign an [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure please ask on the developers list. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). [core-its]: https://maven.apache.org/core-its/core-it-suite/ > 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 >Assignee: Guillaume Nodet >Priority: Minor > Fix For: 4.0.0-alpha-8, 3.9.5 > > > When a pom with modelVersion 4.0 is referenced, such as this one: > {code:xml} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17757215#comment-17757215 ] ASF GitHub Bot commented on MNG-7851: - gnodet commented on PR #1210: URL: https://github.com/apache/maven/pull/1210#issuecomment-1687527207 > If we're going litteral, shouldn't we simply check that the version in the model is one of the supported version. The `validateModelVersion` could be simplified to just check the version is supported or thrown an exception without having to check for newer / older versions. @candrews could you simplify the code for the [`validateModelVersion`](https://github.com/apache/maven/blob/78da8ff662d9c9e0ba87aa2138114d8fd393855c/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java#L1383-L1460) method so that it simply checks if the version is in the provided set instead (third branch of the tests) instead of comparing with all other versions ? > 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} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17750599#comment-17750599 ] ASF GitHub Bot commented on MNG-7851: - cstamas commented on PR #1210: URL: https://github.com/apache/maven/pull/1210#issuecomment-1663410601 The version sorting like code is there (and was) only for "meaningful" error message: newer -> you need newer maven. But i agree, to me this looks overly complicated as well (or just use Version class instead?) > 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} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17749968#comment-17749968 ] ASF GitHub Bot commented on MNG-7851: - michael-o commented on PR #1210: URL: https://github.com/apache/maven/pull/1210#issuecomment-1660814043 > LGTM then please approve > 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} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17749936#comment-17749936 ] ASF GitHub Bot commented on MNG-7851: - cstamas commented on PR #1210: URL: https://github.com/apache/maven/pull/1210#issuecomment-1660695260 LGTM > 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} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17747540#comment-17747540 ] ASF GitHub Bot commented on MNG-7851: - candrews commented on PR #1210: URL: https://github.com/apache/maven/pull/1210#issuecomment-1651879214 > And to do what? I don't see where is the error message adjusted... what do i miss? The new test case at https://github.com/apache/maven/blob/78da8ff662d9c9e0ba87aa2138114d8fd393855c/maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java#L120 demonstrates how the message changes. Before this PR, the message in this case 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.` And with this PR, as this test case proves, the error message is `'modelVersion' must be one of [4.0.0] but is '4.0'.`. > 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} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17747536#comment-17747536 ] ASF GitHub Bot commented on MNG-7851: - michael-o commented on PR #1210: URL: https://github.com/apache/maven/pull/1210#issuecomment-1651870277 I take my first comment back. Thanks for this clarifiction. > 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} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17747538#comment-17747538 ] ASF GitHub Bot commented on MNG-7851: - cstamas commented on PR #1210: URL: https://github.com/apache/maven/pull/1210#issuecomment-1651873331 > allowing it to compare "4", "4.0", and "4.0.0" to each other for example. And to do what? I don't see where is the error message adjusted... what do i miss? > 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} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17747529#comment-17747529 ] ASF GitHub Bot commented on MNG-7851: - candrews commented on PR #1210: URL: https://github.com/apache/maven/pull/1210#issuecomment-1651857385 > I'd say that it should be fixed literal `4.0.0`. Currently, Maven does require it to be the literal `4.0.0`: https://github.com/apache/maven/blob/maven-3.9.4/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java#L138 https://github.com/apache/maven/blob/maven-3.9.4/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java#L1433 This PR adjusts the error message that is returned when attempts to use non-`4.0.0` values are made. > 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} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17747423#comment-17747423 ] ASF GitHub Bot commented on MNG-7851: - michael-o commented on PR #1210: URL: https://github.com/apache/maven/pull/1210#issuecomment-1651384058 Just checked, the schema does not enforce the model version...weird. I'd say that it should be fixed literal `4.0.0`. For me, this is similar to an XML namespace, if you change a single char then you change the entire namespace. @gnodet @cstamas @hboutemy WDYT? > 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} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 `4.0.0`: 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} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17746821#comment-17746821 ] ASF GitHub Bot commented on MNG-7851: - michael-o commented on PR #1210: URL: https://github.com/apache/maven/pull/1210#issuecomment-1649307307 This will very likely violate the generated XML Schema. Moreover, the validator prints a hard version. I consider this change wrong. > 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} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17746150#comment-17746150 ] ASF GitHub Bot commented on MNG-7851: - candrews opened a new pull request, #1210: URL: https://github.com/apache/maven/pull/1210 [MNG-7851](https://issues.apache.org/jira/browse/MNG-7851) Improve error message when modelVersion is 4.0 Improve `DefaultModelValidator.compareModelVersions` to be able to compare versions which different numbers of segments, allowing it to compare "4", "4.0", and "4.0.0" to each other for example. --- Following this checklist to help us incorporate your contribution quickly and easily: - [X] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MNG) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [X] Each commit in the pull request should have a meaningful subject line and body. - [X] Format the pull request title like `[MNG-XXX] SUMMARY`, where you replace `MNG-XXX` and `SUMMARY` with the appropriate JIRA issue. - [X] Also format the first line of the commit message like `[MNG-XXX] SUMMARY`. Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message. - [X] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [X] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [X] You have run the [Core IT][core-its] successfully. If your pull request is about ~20 lines of code you don't need to sign an [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure please ask on the developers list. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [X] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). [core-its]: https://maven.apache.org/core-its/core-it-suite/ > 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} > > 4.0 > foo > bar > 0.1 > > {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)
[jira] [Commented] (MNG-7851) Error message when modelVersion is 4.0 is confusing
[ https://issues.apache.org/jira/browse/MNG-7851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17746148#comment-17746148 ] Craig commented on MNG-7851: I came across this issue due to https://github.com/eclipse-platform/eclipse.platform/issues/180 - it took me much longer than it should have to understand what was happening due to this less than ideal error message. > 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} > > 4.0 > foo > bar > 0.1 > > {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)