fix it for maven3 as profile activation is different from maven2

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@1227305 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-01-04 20:25:19 +00:00
parent 1522319c06
commit 25f51f098e
1 changed files with 16 additions and 2 deletions

View File

@ -141,7 +141,18 @@ public class MavenITmng5224InjectedSettings
*/
Xpp3Dom activeProfilesNode = dom.getChild( "activeProfiles" );
// 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 MavenITmng5224InjectedSettings
activeProfiles.add( node.getValue() );
}
if ( matchesVersionRange( "[2.0.3,3.0-alpha-1)" ) )
{
assertTrue( activeProfiles.contains( "apache" ) );
}
assertTrue( activeProfiles.contains( "it-defaults" ) );
}