The following comment has been added to this issue: Author: Brett Porter Created: Wed, 17 Nov 2004 2:43 PM Body: works for me --------------------------------------------------------------------- View this comment: http://jira.codehaus.org/browse/MAVEN-1422?page=comments#action_26619
--------------------------------------------------------------------- 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 2:43 PM 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]