maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r757491 - in /maven/components/trunk/maven-project/src: main/java/org/apache/maven/project/processor/ProcessorContext.java test/java/org/apache/maven/project/PomConstructionTest.java
Date Mon, 23 Mar 2009 18:35:53 GMT
Author: sisbell
Date: Mon Mar 23 18:35:53 2009
New Revision: 757491

URL: http://svn.apache.org/viewvc?rev=757491&view=rev
Log:
[MNG-2309] - Profile activation order.

Modified:
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ProcessorContext.java
    maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ProcessorContext.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ProcessorContext.java?rev=757491&r1=757490&r2=757491&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ProcessorContext.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ProcessorContext.java
Mon Mar 23 18:35:53 2009
@@ -74,12 +74,13 @@
     public static PomClassicDomainModel mergeProfilesIntoModel(Collection<Profile>
profiles, Model model, boolean isMostSpecialized) throws IOException
     {
         List<Model> profileModels = new ArrayList<Model>();
-        profileModels.add( model );
+
         for(Profile profile : profiles)
         {
             profileModels.add( attachProfileNodesToModel(profile) );
         }
-        
+        Collections.reverse( profileModels );
+        profileModels.add( 0, model );
         List<Processor> processors =
             Arrays.asList( (Processor) new BuildProcessor( new ArrayList<Processor>()
),
                            (Processor) new ProfilesModuleProcessor(), new ProfilePropertiesProcessor(),
new ParentProcessor(),

Modified: maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=757491&r1=757490&r2=757491&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
(original)
+++ maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
Mon Mar 23 18:35:53 2009
@@ -121,7 +121,6 @@
     	throws Exception 
     {
     	PomTestWrapper pom = buildPomFromMavenProject( "profile-properties-interpolation", "interpolation-profile"
);
-    	System.out.println(pom.getDomainModel().asString());
     	assertEquals("PASSED", pom.getValue("properties[1]/test"));
     	assertEquals("PASSED", pom.getValue("properties[1]/property"));
     }
@@ -418,7 +417,6 @@
         throws Exception
     {
         PomTestWrapper pom = buildPom( "merged-plugin-exec-order/wo-plugin-mngt/sub" );
-        System.out.println(pom.getDomainModel().asString());
         assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions" )
).size() );
         assertEquals( "parent-1", pom.getValue( "build/plugins[1]/executions[1]/goals[1]"
) );
         assertEquals( "parent-2", pom.getValue( "build/plugins[1]/executions[2]/goals[1]"
) );
@@ -431,7 +429,6 @@
         throws Exception
     {
         PomTestWrapper pom = buildPom( "merged-plugin-exec-order/w-plugin-mngt/sub" );
-        System.out.println(pom.getDomainModel().asString());
         assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions" )
).size() );
         assertEquals( "parent-1", pom.getValue( "build/plugins[1]/executions[1]/goals[1]"
) );
         assertEquals( "parent-2", pom.getValue( "build/plugins[1]/executions[2]/goals[1]"
) );
@@ -454,7 +451,7 @@
         throws Exception
     {
         PomTestWrapper pom = buildPom( "merged-plugin-exec-goals-order/wo-plugin-mngt/sub"
);
-        System.out.println(pom.getDomainModel().asString());
+
         assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/goals"
) ).size() );
         assertEquals( "child-a", pom.getValue( "build/plugins[1]/executions[1]/goals[1]"
) );
         assertEquals( "merged", pom.getValue( "build/plugins[1]/executions[1]/goals[2]" )
);
@@ -749,7 +746,7 @@
         throws Exception
     {
         PomTestWrapper pom = buildPom( "plugin-config-merging/child" );
-        System.out.println(pom.getDomainModel().asString());
+
         String prefix = "build/plugins[1]/configuration/";
         assertEquals( "PASSED", pom.getValue( prefix + "propertiesFile" ) );
         assertEquals( "PASSED", pom.getValue( prefix + "parent" ) );
@@ -1170,13 +1167,13 @@
         assertEquals( "run", pom.getValue( "reporting/plugins[1]/reportSets[1]/reports[1]"
) );
     }
 
-    /* FIXME: MNG-2309
+    /* FIXME: MNG-2309*/
     public void testProfileInjectionOrder()
         throws Exception
     {
         PomTestWrapper pom =
             buildPomFromMavenProject( "profile-injection-order", "pom-a", "pom-b", "pom-e",
"pom-c", "pom-d" );
-        
+
         assertEquals( "e", pom.getValue( "properties[1]/pomProperty" ) );
     }
     //*/



Mime
View raw message