The following comment has been added to this issue:

     Author: Edwin Chiu
    Created: Wed, 17 Nov 2004 9:48 AM
       Body:
This defect should be reopened as the attached test case (1422.zip) still fails.

Here's the output

C:\devel\projects\maven-bugs\1422\layer1\layer2\layer3>maven -Dgoal=build multip
roject:goal
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0.1

build:start:

build:
    [echo]  variable SARPLUGINVER 1.0

multiproject:projects-init:
    [echo] Gathering project list
Starting the reactor...
Our processing order:
layer5
layer4
+----------------------------------------
| Gathering project list layer5
| Memory: 4M/6M
+----------------------------------------
+----------------------------------------
| Gathering project list layer4
| Memory: 4M/6M
+----------------------------------------
Starting the reactor...
Our processing order:
layer5
layer4
+----------------------------------------
| Executing true layer5
| Memory: 4M/6M
+----------------------------------------

BUILD FAILED
File...... C:\Documents and 
Settings\utomatoe\.maven\cache\maven-multiproject-plugin-1.3.1\plugin.jelly
Element... maven:reactor
Line...... 217
Column.... 9
Unknown goal "true"
Total time: 2 seconds
Finished at: Tue Nov 16 17:52:17 EST 2004
---------------------------------------------------------------------
View this comment:
  http://jira.codehaus.org/browse/MAVEN-1422?page=comments#action_26555

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MAVEN-1422

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-1422
    Summary: Inheritence with more than 3 layers does not work
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
 Components: 
             inheritance
   Fix Fors:
             1.0.1
   Versions:
             1.0

   Assignee: 
   Reporter: Eric Lapierre

    Created: Tue, 10 Aug 2004 10:33 AM
    Updated: Wed, 17 Nov 2004 9:48 AM

Description:
I have a project with 5 layers each inheriting from its parent layer.

layer1
layer1/maven.xml
layer1/project.properties
layer1/layer2
layer1/layer2/project.xml
layer1/layer2/project.properties
layer1/layer2/layer3
layer1/layer2/layer3/project.xml
layer1/layer2/layer3/layer4
layer1/layer2/layer3/layer4/project.xml
layer1/layer2/layer3/layer4/layer5
layer1/layer2/layer3/layer4/layer5/project.xml
layer1/project.xml


In the layer1, I have defined a property, and I have defined a goal in the 
layer1 maven.xml to echo the value of that property.


When I use the multiproject goals ( maven -Dgoal=build multiproject:goal ) from 
layer1, layer2  inheritence works fine.

1 option is to fix the MavenUtils.java
--- MavenUtils.java     Tue Aug 10 08:48:30 2004
+++ MavenUtils.java.fix1        Tue Aug 10 08:40:13 2004
@@ -810,7 +810,7 @@
             String key = (String) i.next();
             Object value;
 
-            if ( context.getVariable( key ) == null )
+            if ( context.getVariables().get( key ) == null )
             {
                 value = map.get( key );

Another option is to look at JellyContext.java. The getVariable function only 
looks at the parent variables, not all its ancestors.

/** @return the value of the given variable name */
    public Object getVariable(String name) {
        Object value = variables.get(name);
                
        if ( value == null && isInherit() ) {
            JellyContext parent = getParent();
            if (parent != null) {                
                value = parent.getVariable( name );
            }
        }


 








---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to