Uploaded image for project: 'Archiva (Retired)'
  1. Archiva (Retired)
  2. MRM-620

pom.xml that inherit version from parent show up in reports as "has an invalid project model"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0
    • 1.2-M1
    • reporting
    • None

    Description

      Maven2 allows child modules to inherit the <version> tag from a parent. When Archiva sees an empty or nonexistent version tag in the uploaded pom.xml, it thinks that the pom.xml version does not match the artifacts filename, which is true, but is a completely valid scenario. As far as I can tell, there is no requirement to have a version tag in a child module of a parent.

      Perhaps Archiva should be looking inside the artifact itself under META-INF/pom.properties to verify the artifacts file name against the version. There is always a version number inside the artifacts pom.properties, but not always in the pom.xml. Perhaps a combination of the pom.xml having a parent tag, and no version information tells Archiva to not consider this an error.

      Here is an example of an error generated in reports:

      File workflow-core-common-1.0.1-rc1.pom has an invalid project model [groupId:com.tomax.infrastructure.foo|artifactId:foo-core-common|version:1.0.1-SNAPSHOT|packaging:null]; The model version [1.0.1-SNAPSHOT] does not match the version portion of the filename: 1.0.1-rc1

      I looked at the artifact it complained about, and the pom.xml has not version tag by design as it is inherited. I don't think this should be an error.

      Perhaps Archiva should not produce this error if the version tag does not exist in the pom.xml and there is a parent tag present? As far as I can tell, not having a version tag is completely valid in maven2 as long as parent inheritence provides the version.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jmacdonald801 James MacDonald
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: