Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7851

Error message when modelVersion is 4.0 is confusing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.9.3
    • 3.9.5, 4.0.0-alpha-8, 4.0.0
    • Core
    • None

    Description

      When a pom with modelVersion 4.0 is referenced, such as this one:

      <project>
        <modelVersion>4.0</modelVersion>
        <groupId>foo</groupId>
        <artifactId>bar</artifactId>
        <version>0.1</version>
      </project>
      

      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'.

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            candrews Craig
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: