improved IT to success if settings defines additional properties

This commit is contained in:
Hervé Boutemy 2014-06-01 00:20:13 +02:00
parent 8988fc794e
commit 68979ecc30
2 changed files with 24 additions and 7 deletions

View File

@ -52,7 +52,6 @@ public class MavenITmng5608ProfileActivationWarningTest
// check expected profiles activated, just for sanity // check expected profiles activated, just for sanity
Properties props = verifier.loadProperties( "target/project.properties" ); Properties props = verifier.loadProperties( "target/project.properties" );
assertEquals( "expected 2 active profiles", 2, props.size() );
assertEquals( "expected profile exists-basedir", "expected active profile", assertEquals( "expected profile exists-basedir", "expected active profile",
props.getProperty( "exists-basedir" ) ); props.getProperty( "exists-basedir" ) );
assertEquals( "expected profile mng-5608-missing-project.basedir", "expected active profile", assertEquals( "expected profile mng-5608-missing-project.basedir", "expected active profile",

View File

@ -56,9 +56,18 @@ under the License.
<exists>${project.basedir}/pom.xml</exists> <exists>${project.basedir}/pom.xml</exists>
</file> </file>
</activation> </activation>
<properties> <build>
<mng-5608-exists-project.basedir>unexpected active profile</mng-5608-exists-project.basedir> <plugins>
</properties> <plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-touch</artifactId>
<version>2.1-SNAPSHOT</version>
<configuration>
<fail>true</fail><!-- this profile should not be activated -->
</configuration>
</plugin>
</plugins>
</build>
</profile> </profile>
<profile> <profile>
<id>mng-5608-missing-project.basedir</id> <id>mng-5608-missing-project.basedir</id>
@ -91,9 +100,18 @@ under the License.
<missing>${basedir}/pom.xml</missing> <missing>${basedir}/pom.xml</missing>
</file> </file>
</activation> </activation>
<properties> <build>
<missing-basedir>unexpected active profile</missing-basedir> <plugins>
</properties> <plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-touch</artifactId>
<version>2.1-SNAPSHOT</version>
<configuration>
<fail>true</fail><!-- this profile should not be activated -->
</configuration>
</plugin>
</plugins>
</build>
</profile> </profile>
</profiles> </profiles>
</project> </project>