Issue Details (XML | Word | Printable)

Key: MAVEN-1688
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Henning Schmiedehausen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1

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

Created: 13/Sep/05 10:27 AM   Updated: 11/Mar/07 02:48 PM
Return to search
Component/s: core
Affects Version/s: 1.1-beta-2
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide

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.



Lukas Theussl added a comment - 21/Jul/06 01:21 PM

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?


Arnaud Heritier added a comment - 03/Aug/06 07:13 AM

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