mirror of https://github.com/apache/maven.git
[MNG-3268] Adding IT for multiple -P params on the command line.
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@652909 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d5691c956f
commit
91966db22c
|
@ -82,6 +82,7 @@ public class IntegrationTestSuite
|
||||||
suite.addTestSuite( MavenITmng3341MetadataUpdatedFromDeploymentRepositoryTest.class );
|
suite.addTestSuite( MavenITmng3341MetadataUpdatedFromDeploymentRepositoryTest.class );
|
||||||
suite.addTestSuite( MavenITmng3331ModulePathNormalization.class );
|
suite.addTestSuite( MavenITmng3331ModulePathNormalization.class );
|
||||||
suite.addTestSuite( MavenITmng3221InfiniteForking.class );
|
suite.addTestSuite( MavenITmng3221InfiniteForking.class );
|
||||||
|
suite.addTestSuite( MavenITmng3268MultipleDashPCommandLine.class );
|
||||||
suite.addTestSuite( MavenITmng3220ImportScopeTest.class );
|
suite.addTestSuite( MavenITmng3220ImportScopeTest.class );
|
||||||
suite.addTestSuite( MavenITmng3099SettingsProfilesWithNoPOM.class );
|
suite.addTestSuite( MavenITmng3099SettingsProfilesWithNoPOM.class );
|
||||||
suite.addTestSuite( MavenITmng2972OverridePluginDependency.class );
|
suite.addTestSuite( MavenITmng2972OverridePluginDependency.class );
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
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 MavenITmng3268MultipleDashPCommandLine
|
||||||
|
extends AbstractMavenIntegrationTestCase
|
||||||
|
{
|
||||||
|
public MavenITmng3268MultipleDashPCommandLine()
|
||||||
|
throws InvalidVersionSpecificationException
|
||||||
|
{
|
||||||
|
super( "(2.0.9,)" );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testitMNG2234 ()
|
||||||
|
throws Exception
|
||||||
|
{
|
||||||
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3268-MultipleDashPCommandLine" );
|
||||||
|
|
||||||
|
Verifier verifier;
|
||||||
|
|
||||||
|
verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
|
|
||||||
|
List cliOptions = new ArrayList();
|
||||||
|
cliOptions.add( "-Pprofile1,profile2" );
|
||||||
|
cliOptions.add( "-Pprofile3" );
|
||||||
|
cliOptions.add( "-P profile4" );
|
||||||
|
verifier.setCliOptions( cliOptions );
|
||||||
|
verifier.executeGoal( "package" );
|
||||||
|
|
||||||
|
verifier.verifyErrorFreeLog();
|
||||||
|
verifier.assertFilePresent( "target/profile1/touch.txt" );
|
||||||
|
verifier.assertFilePresent( "target/profile2/touch.txt" );
|
||||||
|
verifier.assertFilePresent( "target/profile3/touch.txt" );
|
||||||
|
verifier.assertFilePresent( "target/profile4/touch.txt" );
|
||||||
|
verifier.resetStreams();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
<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>
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.its.plugins</groupId>
|
||||||
|
<artifactId>maven-it-plugin-touch</artifactId>
|
||||||
|
<version>2.1-SNAPSHOT</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>profile1</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.its.plugins</groupId>
|
||||||
|
<artifactId>maven-it-plugin-touch</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>profile1-touch</id>
|
||||||
|
<goals>
|
||||||
|
<goal>touch</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}/profile1</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>profile2</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.its.plugins</groupId>
|
||||||
|
<artifactId>maven-it-plugin-touch</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>profile2-touch</id>
|
||||||
|
<goals>
|
||||||
|
<goal>touch</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}/profile2</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>profile3</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.its.plugins</groupId>
|
||||||
|
<artifactId>maven-it-plugin-touch</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>profile3-touch</id>
|
||||||
|
<goals>
|
||||||
|
<goal>touch</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}/profile3</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>profile4</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.its.plugins</groupId>
|
||||||
|
<artifactId>maven-it-plugin-touch</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>profile4-touch</id>
|
||||||
|
<goals>
|
||||||
|
<goal>touch</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}/profile4</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
<!--remove when the IT plugins are actually release-->
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>apache.snapshots</id>
|
||||||
|
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
<releases>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</releases>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
|
</project>
|
Loading…
Reference in New Issue