You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2012/01/04 21:25:19 UTC
svn commit: r1227305 -
/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5224InjectedSettings.java
Author: olamy
Date: Wed Jan 4 20:25:19 2012
New Revision: 1227305
URL: http://svn.apache.org/viewvc?rev=1227305&view=rev
Log:
fix it for maven3 as profile activation is different from maven2
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5224InjectedSettings.java
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5224InjectedSettings.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5224InjectedSettings.java?rev=1227305&r1=1227304&r2=1227305&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5224InjectedSettings.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5224InjectedSettings.java Wed Jan 4 20:25:19 2012
@@ -141,7 +141,18 @@ public class MavenITmng5224InjectedSetti
*/
Xpp3Dom activeProfilesNode = dom.getChild( "activeProfiles" );
- assertEquals( 2, activeProfilesNode.getChildCount() );
+
+ // with maven3 profile activation (activeByDefault) is done later during project building phase
+ // so we have only a "dump" of the settings
+
+ if ( matchesVersionRange( "[2.0.3,3.0-alpha-1)" ) )
+ {
+ assertEquals( 2, activeProfilesNode.getChildCount() );
+ }
+ else
+ {
+ assertEquals( 1, activeProfilesNode.getChildCount() );
+ }
List<String> activeProfiles = new ArrayList<String>( 2 );
@@ -150,7 +161,10 @@ public class MavenITmng5224InjectedSetti
activeProfiles.add( node.getValue() );
}
- assertTrue( activeProfiles.contains( "apache" ) );
+ if ( matchesVersionRange( "[2.0.3,3.0-alpha-1)" ) )
+ {
+ assertTrue( activeProfiles.contains( "apache" ) );
+ }
assertTrue( activeProfiles.contains( "it-defaults" ) );
}