You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2004/08/10 16:35:15 UTC

[jira] Created: (MAVEN-1422) Inheritence with more than 3 layers does not work

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
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: Unassigned
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
 Components: 
             inheritance
   Versions:
             1.0

   Assignee: 
   Reporter: Eric Lapierre

    Created: Tue, 10 Aug 2004 10:33 AM
    Updated: Tue, 10 Aug 2004 10:33 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MAVEN-1422) Inheritence with more than 3 layers does not work

Posted by ji...@codehaus.org.
The following comment has been added to this issue:

     Author: Edwin Chiu
    Created: Wed, 17 Nov 2004 4:45 PM
       Body:
Works for me now too. For some reason one of my scripts was calling
"maven -Dgoal build multiproject:goal"

when it should have been

"maven -Dgoal=build multiproject:goal"

Sorry 'bout that!
---------------------------------------------------------------------
View this comment:
  http://jira.codehaus.org/browse/MAVEN-1422?page=comments#action_26628

---------------------------------------------------------------------
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 4:45 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MAVEN-1422) Inheritence with more than 3 layers does not work

Posted by ji...@codehaus.org.
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MAVEN-1422) Inheritence with more than 3 layers does not work

Posted by ji...@codehaus.org.
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MAVEN-1422) Inheritence with more than 3 layers does not work

Posted by ji...@codehaus.org.
The following issue has been updated:

    Updater: Eric Lapierre (mailto:ericlap@nortelnetworks.com)
       Date: Tue, 10 Aug 2004 12:24 PM
    Comment:
Here is a simple testcase.
To reproduce the problem
unzip 1422.zip
cd target1/target2/target3
maven -Dgoal=build multiproject:goal
    Changes:
             Attachment changed to 1422.zip
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://jira.codehaus.org/browse/MAVEN-1422?page=history

---------------------------------------------------------------------
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: Unassigned
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
 Components: 
             inheritance
   Versions:
             1.0

   Assignee: 
   Reporter: Eric Lapierre

    Created: Tue, 10 Aug 2004 10:33 AM
    Updated: Tue, 10 Aug 2004 12:24 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MAVEN-1422) Inheritence with more than 3 layers does not work

Posted by ji...@codehaus.org.
Message:

   The following issue has been closed.

---------------------------------------------------------------------
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: Thu, 4 Nov 2004 9:19 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MAVEN-1422) Inheritence with more than 3 layers does not work

Posted by ji...@codehaus.org.
The following comment has been added to this issue:

     Author: Carlos Sanchez
    Created: Tue, 10 Aug 2004 10:41 AM
       Body:
Could you check the output of maven -X to see if there's any exception?

This sounds related to MPMULTIPROJECT-39 and MAVEN-1404
---------------------------------------------------------------------
View this comment:
  http://jira.codehaus.org/browse/MAVEN-1422?page=comments#action_22951

---------------------------------------------------------------------
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: Unassigned
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
 Components: 
             inheritance
   Versions:
             1.0

   Assignee: 
   Reporter: Eric Lapierre

    Created: Tue, 10 Aug 2004 10:33 AM
    Updated: Tue, 10 Aug 2004 10:41 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MAVEN-1422) Inheritence with more than 3 layers does not work

Posted by ji...@codehaus.org.
The following issue has been updated:

    Updater: Brett Porter (mailto:brett@codehaus.org)
       Date: Sat, 23 Oct 2004 3:08 AM
    Changes:
             Fix Version changed to 1.0.1
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://jira.codehaus.org/browse/MAVEN-1422?page=history

---------------------------------------------------------------------
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: Unassigned
   Priority: Major

 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: Sat, 23 Oct 2004 3:08 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MAVEN-1422) Inheritence with more than 3 layers does not work

Posted by ji...@codehaus.org.
The following comment has been added to this issue:

     Author: Eric Lapierre
    Created: Tue, 10 Aug 2004 12:18 PM
       Body:
I see the same Exceptions with the debug log. However, I don't believe that the ClassCastException is the root cause of the problem.
---------------------------------------------------------------------
View this comment:
  http://jira.codehaus.org/browse/MAVEN-1422?page=comments#action_22953

---------------------------------------------------------------------
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: Unassigned
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
 Components: 
             inheritance
   Versions:
             1.0

   Assignee: 
   Reporter: Eric Lapierre

    Created: Tue, 10 Aug 2004 10:33 AM
    Updated: Tue, 10 Aug 2004 12:18 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MAVEN-1422) Inheritence with more than 3 layers does not work

Posted by ji...@codehaus.org.
The following comment has been added to this issue:

     Author: Edwin Chiu
    Created: Wed, 27 Oct 2004 5:11 PM
       Body:
Seen MAVEN-1479 for a possible fix
---------------------------------------------------------------------
View this comment:
  http://jira.codehaus.org/browse/MAVEN-1422?page=comments#action_25822

---------------------------------------------------------------------
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: Unassigned
   Priority: Major

 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, 27 Oct 2004 5:11 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org