From aeba75bc0498f8b3aa3010b6efe487cdc7f4b067 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Tue, 10 Mar 2009 11:34:51 +0000 Subject: [PATCH] o Fixed IT git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@752071 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/it/MavenITmng3732ActiveProfilesTest.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3732ActiveProfilesTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3732ActiveProfilesTest.java index 8f7f8f15fc..8f45fe9e0c 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3732ActiveProfilesTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3732ActiveProfilesTest.java @@ -64,14 +64,15 @@ public class MavenITmng3732ActiveProfilesTest Properties props = verifier.loadProperties( "target/profile.properties" ); List ids = new ArrayList(); - ids.add( props.getProperty( "project.activeProfiles.0.id", "" ) ); - ids.add( props.getProperty( "project.activeProfiles.1.id", "" ) ); - ids.add( props.getProperty( "project.activeProfiles.2.id", "" ) ); - Collections.sort( ids ); // support for profiles.xml removed from 3.x (see MNG-4060) if ( matchesVersionRange( "[2.0,3.0-alpha-1)" ) ) { + ids.add( props.getProperty( "project.activeProfiles.0.id", "" ) ); + ids.add( props.getProperty( "project.activeProfiles.1.id", "" ) ); + ids.add( props.getProperty( "project.activeProfiles.2.id", "" ) ); + Collections.sort( ids ); + assertEquals( Arrays.asList( new String[] { "pom", "profiles", "settings" } ), ids ); assertEquals( "3", props.getProperty( "project.activeProfiles" ) ); @@ -81,6 +82,10 @@ public class MavenITmng3732ActiveProfilesTest } else { + ids.add( props.getProperty( "project.activeProfiles.0.id", "" ) ); + ids.add( props.getProperty( "project.activeProfiles.1.id", "" ) ); + Collections.sort( ids ); + assertEquals( Arrays.asList( new String[] { "pom", "settings" } ), ids ); assertEquals( "2", props.getProperty( "project.activeProfiles" ) );