jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-3807

Maven is not interpolatin Properties at plugin configuration

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.9, 2.1.0-M1
  • Fix Version/s: 3.0-alpha-3
  • Component/s: Inheritance and Interpolation
  • Labels:
    None
  • Complexity:
    Intermediate

Description

My plugin has a configuration like this:

 
    /**
     * My Properties.
     *
     * @parameter
     */
    private Properties myProperties;

When I configure like this:

 
<myProperties>
  <property>
    <name>propertyName1</name>
    <value>${buildnumber}</value> <!-- property injected on maven properties by  http://mojo.codehaus.org/buildnumber-maven-plugin/ -->
  <property>
</myProperties>

Maven doesn't interpolate the buildnumber. But the value is available at project.getProperties().

Issue Links

depends upon

Bug - A problem which impairs or prevents the functions of the product. MNG-3878 upgrade the Plexus container

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Bug - A problem which impairs or prevents the functions of the product. PLX-441 Configurator for java.util.Properties does not evaluate expressions

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is related to

Bug - A problem which impairs or prevents the functions of the product. MNG-2201 Interpolation problem when using surefire

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
John Casey added a comment - 28/Oct/08 3:57 PM

This is related to the version of the plexus container we're using in maven. With more recent versions, the PropertiesConverter (used to convert XML to a Properties instance for plugin parameter injection) does evaluate embedded expressions. However, as of 1.0-alpha-9 of the plexus container, this new code was not in place.

It seems we have two options for fixing this:

1. create a maintenance branch based on plexus 1.0-alpha-9 and fix the PropertiesConverter there, then release a new revision for use in maven
2. move maven onto a more recent plexus version, which will entail quite a bit of work since the component model has changed in important ways since alpha-9.

My personal opinion is that #2 is preferable if it's reasonably easy to do (not sure on this). This would modernize Maven WRT the plexus container, and enable us to track a little more closely with the progress in plexus in future. However, we could fix the PropertiesConverter itself very quickly, making #1 a much more expedient option.

Show
John Casey added a comment - 28/Oct/08 3:57 PM This is related to the version of the plexus container we're using in maven. With more recent versions, the PropertiesConverter (used to convert XML to a Properties instance for plugin parameter injection) does evaluate embedded expressions. However, as of 1.0-alpha-9 of the plexus container, this new code was not in place. It seems we have two options for fixing this: 1. create a maintenance branch based on plexus 1.0-alpha-9 and fix the PropertiesConverter there, then release a new revision for use in maven 2. move maven onto a more recent plexus version, which will entail quite a bit of work since the component model has changed in important ways since alpha-9. My personal opinion is that #2 is preferable if it's reasonably easy to do (not sure on this). This would modernize Maven WRT the plexus container, and enable us to track a little more closely with the progress in plexus in future. However, we could fix the PropertiesConverter itself very quickly, making #1 a much more expedient option.
Hide
Permalink
Brett Porter added a comment - 18/Dec/08 4:33 AM

Bump plexus container changes to 2.2, if not 3.0

Show
Brett Porter added a comment - 18/Dec/08 4:33 AM Bump plexus container changes to 2.2, if not 3.0
Hide
Permalink
Benjamin Bentmann added a comment - 26/Oct/09 7:58 AM

Fixed in r829780.

Show
Benjamin Bentmann added a comment - 26/Oct/09 7:58 AM Fixed in r829780.

People

  • Assignee:
    Benjamin Bentmann
    Reporter:
    Marvin Froeder
Vote (0)
Watch (0)

Dates

  • Created:
    28/Oct/08 12:24 PM
    Updated:
    26/Oct/09 7:58 AM
    Resolved:
    26/Oct/09 7:58 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.