You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2009/02/26 14:40:01 UTC

svn commit: r748149 - in /maven/components/branches/maven-2.0.x: ./ apache-maven/ apache-maven/src/test/ maven-integration-tests/ maven-model/src/test/ maven-project/src/main/java/org/apache/maven/project/ maven-project/src/test/java/org/apache/maven/p...

Author: brett
Date: Thu Feb 26 13:40:00 2009
New Revision: 748149

URL: http://svn.apache.org/viewvc?rev=748149&view=rev
Log:
[MNG-3811] Report plugins don't inherit configuration
Submitted by: Nik Everett
Merged from: r748146

Modified:
    maven/components/branches/maven-2.0.x/   (props changed)
    maven/components/branches/maven-2.0.x/apache-maven/   (props changed)
    maven/components/branches/maven-2.0.x/apache-maven/src/test/   (props changed)
    maven/components/branches/maven-2.0.x/maven-integration-tests/   (props changed)
    maven/components/branches/maven-2.0.x/maven-model/src/test/   (props changed)
    maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
    maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/ModelUtilsTest.java

Propchange: maven/components/branches/maven-2.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 26 13:40:00 2009
@@ -1,3 +1,3 @@
 /maven/components/branches/maven-2.0.10-RC:708790-728809,728834
-/maven/components/branches/maven-2.1.x:720038,727670,727762,727868,728933,728937,737683,738723,738753,739385,741507,741518,741870,742819,744645,745836,747468,747683,747799,748102,748111
+/maven/components/branches/maven-2.1.x:720038,727670,727762,727868,728933,728937,737683,738723,738753,739385,741507,741518,741870,742819,744645,745836,747468,747683,747799,748102,748111,748146
 /maven/components/trunk:720001,721902,726845,729292

Propchange: maven/components/branches/maven-2.0.x/apache-maven/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 26 13:40:00 2009
@@ -1,5 +1,5 @@
 /maven/components/branches/maven-2.0.10-RC/apache-maven:708790-728809,728834
 /maven/components/branches/maven-2.0.x/apache-maven:533160,636838,645583,645642,647357,649903,657432,659677,662033,662251,669665,670358,673499,673905,674059,675074,675087,675096,675375,675380,680604,682055
-/maven/components/branches/maven-2.1.x/apache-maven:720038,728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799,748102,748111
+/maven/components/branches/maven-2.1.x/apache-maven:720038,728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799,748102,748111,748146
 /maven/components/trunk/apache-maven:720001,721902,726845
 /maven/components/trunk/maven-distribution:727688

Propchange: maven/components/branches/maven-2.0.x/apache-maven/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 26 13:40:00 2009
@@ -1,2 +1,2 @@
 /maven/components/branches/maven-2.0.10-RC/apache-maven/src/test:727009-728809,728834
-/maven/components/branches/maven-2.1.x/apache-maven/src/test:728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799,748102,748111
+/maven/components/branches/maven-2.1.x/apache-maven/src/test:728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799,748102,748111,748146

Propchange: maven/components/branches/maven-2.0.x/maven-integration-tests/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 26 13:40:00 2009
@@ -1,2 +1,2 @@
 /maven/components/branches/maven-2.0.10-RC/maven-integration-tests:709246-728809,728834
-/maven/components/branches/maven-2.1.x/maven-integration-tests:728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799,748102,748111
+/maven/components/branches/maven-2.1.x/maven-integration-tests:728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799,748102,748111,748146

Propchange: maven/components/branches/maven-2.0.x/maven-model/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 26 13:40:00 2009
@@ -1,2 +1,2 @@
 /maven/components/branches/maven-2.0.10-RC/maven-model/src/test:727009-728809,728834
-/maven/components/branches/maven-2.1.x/maven-model/src/test:728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799,748102,748111
+/maven/components/branches/maven-2.1.x/maven-model/src/test:728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799,748102,748111,748146

Modified: maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java?rev=748149&r1=748148&r2=748149&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java Thu Feb 26 13:40:00 2009
@@ -458,11 +458,22 @@
             child.setVersion( parent.getVersion() );
         }
 
-        // from here to the end of the method is dealing with merging of the <executions/> section.
         String parentInherited = parent.getInherited();
 
         boolean parentIsInherited = ( parentInherited == null ) || Boolean.valueOf( parentInherited ).booleanValue();
 
+        // merge configuration just like with build plugins	
+        if ( parentIsInherited )
+        {
+            Xpp3Dom childConfiguration = (Xpp3Dom) child.getConfiguration();
+            Xpp3Dom parentConfiguration = (Xpp3Dom) parent.getConfiguration();
+
+            childConfiguration = Xpp3Dom.mergeXpp3Dom( childConfiguration, parentConfiguration );
+
+            child.setConfiguration( childConfiguration );
+        }
+
+        // from here to the end of the method is dealing with merging of the <executions/> section.
         List parentReportSets = parent.getReportSets();
 
         if ( ( parentReportSets != null ) && !parentReportSets.isEmpty() )

Modified: maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/ModelUtilsTest.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/ModelUtilsTest.java?rev=748149&r1=748148&r2=748149&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/ModelUtilsTest.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/ModelUtilsTest.java Thu Feb 26 13:40:00 2009
@@ -193,8 +193,7 @@
         Xpp3Dom result3Config = (Xpp3Dom) result3.getConfiguration();
 
         assertNotNull( result3Config );
-        // Carlos: Current behavior is not to merge the ocnfiguration, although dont know why 
-        assertNull( result3Config.getChild( "key" ) );
+        assertNotNull( result3Config.getChild( "key" ) );
         assertNotNull( result3Config.getChild( "key2" ) );
 
         //assertEquals( "value", result3Config.getChild( "key" ).getValue() );