mirror of https://github.com/apache/maven.git
[MNG-2309] - Profile activation order.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@757491 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0f8624c297
commit
1c35174120
|
@ -74,12 +74,13 @@ public class ProcessorContext
|
|||
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(),
|
||||
|
|
|
@ -121,7 +121,6 @@ public class PomConstructionTest
|
|||
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 @@ public class PomConstructionTest
|
|||
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 @@ public class PomConstructionTest
|
|||
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 @@ public class PomConstructionTest
|
|||
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 @@ public class PomConstructionTest
|
|||
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 @@ public class PomConstructionTest
|
|||
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" ) );
|
||||
}
|
||||
//*/
|
||||
|
|
Loading…
Reference in New Issue