Issue Details (XML | Word | Printable)

Key: MNG-2651
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Kenney Westerhof
Reporter: Daniel Schulz
Votes: 2
Watchers: 5
Operations

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

POM interpolator treats ${pom.something} like ${something} and prefers system properties

Created: 04/Nov/06 05:05 PM   Updated: 17/Dec/08 10:06 PM
Component/s: Inheritance and Interpolation
Affects Version/s: 2.0.4
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Duplicate
 
dependent
 

Complexity: Intermediate


 Description  « Hide
The POM interpolator (RegexBasedModelInterpolator) removes all leading "pom.", "project." and "env." portions of an expression before evaluating it. then searching for values happens in the following order: system properties, project properties, pom bean properties.

An example: Although ${pom.version} is more specific than ${version}, version wins. That's the problem in MNGECLIPSE-20.

IMHO the interpolation strategy should be changed.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Wayne Fay added a comment - 08/Feb/07 01:02 AM
This seems to be the root cause behind numerous other bugs posted in JIRA...
MNG-2288
MNG-2339
MNG-2486
MNG-2653

It is also the cause for quite a lot of emails on the Maven Users list over the last year.


Thierry Monney added a comment - 13/Jun/07 05:56 AM
We have a similar problem in our setup: the property ${weblogic.name} is replaced by the value of the current ${project.name} property. This looks like the interpolator removes the "xxx." in ${xxx.name} (not only "pom.", "project." and "env."). Could this be the case ?