Maven 2 & 3

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 2.0.4
  • Fix Version/s: None
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

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.

Issue Links

Activity

Hide
Wayne Fay added a comment -

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.

Show
Wayne Fay added a comment - 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.
Hide
Thierry Monney added a comment -

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 ?

Show
Thierry Monney added a comment - 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 ?

People

Vote (2)
Watch (5)

Dates

  • Created:
    Updated:
    Resolved: