Maven 1
  1. Maven 1
  2. MAVEN-1688

The ${pom.versions} List behaves differently when running plugins under maven 1.1 and maven 1.0

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.1-beta-2
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Consider the following POM snipped:

      <versions>
      <version>
      <name>2.1</name>
      <tag>TURBINE_2_1</tag>
      </version>
      <version>
      <name>2.2</name>
      <tag>TURBINE_2_2_0</tag>
      </version>
      <version>
      <name>2.3-rc1</name>
      <tag>TURBINE_2_3_RC1</tag>
      </version>
      <version>
      <name>2.3-rc2</name>
      <tag>TURBINE_2_3_RC2</tag>
      </version>
      <version>
      <name>2.3</name>
      <tag>TURBINE_2_3</tag>
      </version>
      <version>
      <name>2.3.1-RC1</name>
      <tag>TURBINE_2_3_1_RC1</tag>
      </version>
      <version>
      <name>2.3.1-RC2</name>
      <tag>TURBINE_2_3_1_RC2</tag>
      </version>
      <version>
      <name>2.3.1</name>
      <tag>TURBINE_2_3_1</tag>
      <id>2.3.1</id>
      </version>
      <version>
      <name>2.3.2-RC1</name>
      <tag>TURBINE_2_3_2_RC1</tag>
      </version>
      </versions>

      echoing $

      {pom.versions}

      under the 1.0.2 maven release issues the following output:

      [echo] [2.1, 2.2, 2.3-rc1, 2.3-rc2, 2.3, 2.3.1-RC1, 2.3.1-RC2, 2.3.1, 2.3.2-RC1]

      doing the same thing under the 1.1-beta 2 core results in

      [echo] [null, null, null, null, null, null, null, 2.3.1, null]

      It seems that 1.0 uses the name as key and 1.1 uses the id. This causes e.g. the clirr plugin to fail if a project
      defines names for a version entry but no id.

      If it is necessary that a version entry contains name and/or id, it should be enforced by the maven core and bad
      entries should be reported.

        Activity

        Hide
        Lukas Theussl added a comment -

        The pom:validate goal correctly reports an error here because the id element is required by the xsd. However, we need some basic validation routine within the core, how is this done in m2?

        Show
        Lukas Theussl added a comment - The pom:validate goal correctly reports an error here because the id element is required by the xsd. However, we need some basic validation routine within the core, how is this done in m2?
        Hide
        Arnaud Heritier added a comment -

        By default if id isn't set, wa can returns the name (with a warning message)

        Show
        Arnaud Heritier added a comment - By default if id isn't set, wa can returns the name (with a warning message)
        Hide
        Michael Osipov added a comment -

        Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

        Show
        Michael Osipov added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

          People

          • Assignee:
            Unassigned
            Reporter:
            Henning Schmiedehausen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: