[MNG-2234] add an integration test for activation of profiles from

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@633736 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2008-03-05 01:03:39 +00:00
parent 182de8f5d5
commit 040e408010
4 changed files with 72 additions and 0 deletions

View File

@ -178,6 +178,7 @@ public class IntegrationTestSuite
suite.addTestSuite( MavenITmng1491ReactorArtifactIdCollision.class );
suite.addTestSuite( MavenITmng3426PluginsClasspathOverrideTest.class );
suite.addTestSuite( MavenITmng3428PluginDescriptorArtifactsIncompleteTest.class );
// suite.addTestSuite( MavenITmng2234ActiveProfilesFromSettingsTest.class );
suite.addTestSuite( MavenITmng2123VersionRangeDependencyTest.class );
// ----------------------------------------------------------------------------------------------------

View File

@ -0,0 +1,39 @@
package org.apache.maven.integrationtests;
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class MavenITmng2234ActiveProfilesFromSettingsTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng2234ActiveProfilesFromSettingsTest()
throws InvalidVersionSpecificationException
{
super( "(2.0.8,)" );
}
public void testitMNG2234 ()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2234-activeProfilesFromSettings" );
Verifier verifier;
verifier = new Verifier( testDir.getAbsolutePath() );
List cliOptions = new ArrayList();
cliOptions.add( "-s" );
cliOptions.add( "settings.xml" );
verifier.setCliOptions( cliOptions );
verifier.executeGoal( "install" );
verifier.verifyErrorFreeLog();
verifier.assertFilePresent( "target/touch.txt" );
verifier.resetStreams();
}
}

View File

@ -0,0 +1,27 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.mng2234</groupId>
<artifactId>test-artifact</artifactId>
<version>1.0-SNAPSHOT</version>
<profiles>
<profile>
<id>env-test</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-touch</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>touch</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,5 @@
<settings>
<activeProfiles>
<activeProfile>env-test</activeProfile>
</activeProfiles>
</settings>