You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by pg...@apache.org on 2008/05/02 23:01:21 UTC

svn commit: r652909 - in /maven/core-integration-testing/trunk/core-integration-tests/src/test: java/org/apache/maven/integrationtests/ resources/mng-3268-MultipleDashPCommandLine/

Author: pgier
Date: Fri May  2 14:01:21 2008
New Revision: 652909

URL: http://svn.apache.org/viewvc?rev=652909&view=rev
Log:
[MNG-3268] Adding IT for multiple -P params on the command line.

Added:
    maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3268MultipleDashPCommandLine.java   (with props)
    maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3268-MultipleDashPCommandLine/
    maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3268-MultipleDashPCommandLine/pom.xml   (with props)
Modified:
    maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java

Modified: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java?rev=652909&r1=652908&r2=652909&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java (original)
+++ maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java Fri May  2 14:01:21 2008
@@ -82,6 +82,7 @@
         suite.addTestSuite( MavenITmng3341MetadataUpdatedFromDeploymentRepositoryTest.class );
         suite.addTestSuite( MavenITmng3331ModulePathNormalization.class );
         suite.addTestSuite( MavenITmng3221InfiniteForking.class );
+        suite.addTestSuite( MavenITmng3268MultipleDashPCommandLine.class );
         suite.addTestSuite( MavenITmng3220ImportScopeTest.class );
         suite.addTestSuite( MavenITmng3099SettingsProfilesWithNoPOM.class );
         suite.addTestSuite( MavenITmng2972OverridePluginDependency.class );

Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3268MultipleDashPCommandLine.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3268MultipleDashPCommandLine.java?rev=652909&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3268MultipleDashPCommandLine.java (added)
+++ maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3268MultipleDashPCommandLine.java Fri May  2 14:01:21 2008
@@ -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();
+    }
+}

Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3268MultipleDashPCommandLine.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3268MultipleDashPCommandLine.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3268-MultipleDashPCommandLine/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3268-MultipleDashPCommandLine/pom.xml?rev=652909&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3268-MultipleDashPCommandLine/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3268-MultipleDashPCommandLine/pom.xml Fri May  2 14:01:21 2008
@@ -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>

Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3268-MultipleDashPCommandLine/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3268-MultipleDashPCommandLine/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision