Properties are not inherited
----------------------------

                 Key: MRELEASE-668
                 URL: http://jira.codehaus.org/browse/MRELEASE-668
             Project: Maven 2.x Release Plugin
          Issue Type: Bug
          Components: prepare
    Affects Versions: 2.1
            Reporter: Maarten Billemont


When a parent defines a property, eg. myproject.version, and a child uses it in 
reference of a dependency on a module in the project, the property cannot be 
found, and prepare fails with:

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-release-plugin:2.1:prepare (default-cli) on 
project myproject: The version could not be updated: ${myproject.version} -> 
[Help 1]

Setup:

mycompany:myproject:1.0-SNAPSHOT  ( has 
<properties><myproject.version>1.0-SNAPSHOT</myproject.version></properties> )
 - mycompany.myproject:child1:1.0-SNAPSHOT ( has no <properties />, has a 
<dependency> on mycompany.myproject:child2:${myproject.version} )
 - mycompany.myproject:child2:1.0-SNAPSHOT

This setup results in the error message above after showing:

[INFO] Transforming 'child1'...
[INFO] Updating child2 to 1.0

If I copy the <properties> from myproject into child1 then child1's dependency 
on child2 updates just fine.
I would expect child1 to *inherit* all properties from myproject, but for some 
reason, it doesn't.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to