Author: jdcasey
Date: Thu Feb 7 16:42:53 2008
New Revision: 619709
URL: http://svn.apache.org/viewvc?rev=619709&view=rev
Log:
Adjust these ITs to avoid using aggregator mojos that are bound to the
lifecycle.
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0043Test.java
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0102Test.java
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng1412DependenciesOrderTest.java
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0043/child1/pom.xml
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0043/child2/pom.xml
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0095/sub1/pom.xml
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0100/parent/child/pom.xml
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0102/pom.xml
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0129-resourcesForAPluginProvidedAsAPluginDependency/extension/pom.xml
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-1412-DependenciesOrder/src/test/java/org/apache/maven/its/itmng1412/ITmng1412DependenciesOrderTest.java
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0043Test.java
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0043Test.java?rev=619709&r1=619708&r2=619709&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0043Test.java
(original)
+++
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0043Test.java
Thu Feb 7 16:42:53 2008
@@ -16,10 +16,20 @@
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/it0043" );
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "package" );
- verifier.assertFilePresent(
"child1/target/maven-it-it0043-child1-1.0-SNAPSHOT.jar" );
- verifier.assertFilePresent(
"child2/target/maven-it-it0043-child2-1.0-SNAPSHOT.jar" );
+
+ File child1 = new File( testDir, "child1" );
+ Verifier verifier = new Verifier( child1.getAbsolutePath() );
+
+ verifier.deleteArtifact( "org.apache.maven.plugins",
"maven-help-plugin", "2.0.2", "jar" );
+
+ verifier.executeGoal(
"org.apache.maven.plugins:maven-help-plugin:2.0.2:effective-pom" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ File child2 = new File( testDir, "child2" );
+ verifier = new Verifier( child2.getAbsolutePath() );
+
+ verifier.executeGoal(
"org.apache.maven.plugins:maven-help-plugin:2.0.2:effective-pom" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java?rev=619709&r1=619708&r2=619709&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java
(original)
+++
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java
Thu Feb 7 16:42:53 2008
@@ -4,6 +4,8 @@
import org.apache.maven.it.util.ResourceExtractor;
import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
public class MavenIT0095Test
extends AbstractMavenIntegrationTestCase
@@ -15,9 +17,22 @@
public void testit0095()
throws Exception
{
+ // TODO: This is WRONG! Need to run only sub1 to effective-pom, then
run all to verify.
File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/it0095" );
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "integration-test" );
+ File sub1 = new File( testDir, "sub1" );
+
+ Verifier verifier = new Verifier( sub1.getAbsolutePath() );
+
+ List options = new ArrayList();
+ options.add( "-Doutput=" + new File( sub1, "target/effective-pom.xml"
).getAbsolutePath() );
+
+ verifier.setCliOptions( options );
+
+ List goals = new ArrayList();
+ goals.add(
"org.apache.maven.plugins:maven-help-plugin:2.0.2:effective-pom" );
+ goals.add( "verify" );
+
+ verifier.executeGoals( goals );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java?rev=619709&r1=619708&r2=619709&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java
(original)
+++
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java
Thu Feb 7 16:42:53 2008
@@ -4,6 +4,8 @@
import org.apache.maven.it.util.ResourceExtractor;
import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
public class MavenIT0100Test
extends AbstractMavenIntegrationTestCase
@@ -16,8 +18,21 @@
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/it0100" );
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "verify" );
+ File child = new File( testDir, "parent/child" );
+
+ Verifier verifier = new Verifier( child.getAbsolutePath() );
+
+ List options = new ArrayList();
+ options.add( "-Doutput=" + new File( child, "target/effective-pom.txt"
).getAbsolutePath() );
+
+ verifier.setCliOptions( options );
+
+ List goals = new ArrayList();
+ goals.add(
"org.apache.maven.plugins:maven-help-plugin:2.0.2:effective-pom" );
+ goals.add( "verify" );
+
+ verifier.executeGoals( goals );
+
verifier.verifyErrorFreeLog();
verifier.resetStreams();
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0102Test.java
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0102Test.java?rev=619709&r1=619708&r2=619709&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0102Test.java
(original)
+++
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0102Test.java
Thu Feb 7 16:42:53 2008
@@ -4,6 +4,8 @@
import org.apache.maven.it.util.ResourceExtractor;
import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
public class MavenIT0102Test
extends AbstractMavenIntegrationTestCase
@@ -17,8 +19,18 @@
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/it0102" );
+
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "verify" );
+
+ List options = new ArrayList();
+ options.add( "-Doutput=" + new File( testDir,
"target/effective-pom.txt" ).getAbsolutePath() );
+
+ verifier.setCliOptions( options );
+
+ List goals = new ArrayList();
+ goals.add(
"org.apache.maven.plugins:maven-help-plugin:2.0.2:effective-pom" );
+ goals.add( "verify" );
+
verifier.verifyErrorFreeLog();
verifier.resetStreams();
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng1412DependenciesOrderTest.java
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng1412DependenciesOrderTest.java?rev=619709&r1=619708&r2=619709&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng1412DependenciesOrderTest.java
(original)
+++
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng1412DependenciesOrderTest.java
Thu Feb 7 16:42:53 2008
@@ -1,19 +1,18 @@
package org.apache.maven.integrationtests;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
import
org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
-import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
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;
+
/**
* Test that dependencies order in classpath matches pom.xml.
- *
+ *
* @author <a href="mailto:[EMAIL PROTECTED]">Herve Boutemy</a>
- *
+ *
*/
public class MavenITmng1412DependenciesOrderTest
extends AbstractMavenIntegrationTestCase
@@ -33,7 +32,10 @@
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
List cliOptions = new ArrayList();
- cliOptions.add( "-N" );
+ cliOptions.add( "-X" );
+
+ verifier.setCliOptions( cliOptions );
+
verifier.executeGoal( "test" );
verifier.verifyErrorFreeLog();
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0043/child1/pom.xml
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0043/child1/pom.xml?rev=619709&r1=619708&r2=619709&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0043/child1/pom.xml
(original)
+++
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0043/child1/pom.xml
Thu Feb 7 16:42:53 2008
@@ -1,43 +1,13 @@
<project>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.maven.its.it0043</groupId>
+ <parent>
+ <groupId>org.apache.maven.its.it0043</groupId>
+ <artifactId>maven-it-it0043-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
<artifactId>maven-it-it0043-child1</artifactId>
- <version>1.0-SNAPSHOT</version>
<name>Maven Integration Test :: it0043 Child1</name>
<description>Test for repository inheritence - ensure using the same id
overrides the defaults</description>
- <!-- Use 2.0.2-SNAPSHOT because of MPH-21. Remove when it's released.
-->
- <pluginRepositories>
- <pluginRepository>
- <id>apache.snapshots</id>
- <name>Apache Snapshot Repository</name>
- <url>http://people.apache.org/repo/m2-snapshot-repository</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- </pluginRepository>
- </pluginRepositories>
-
- <!-- ensure help plugin is in the local repo, as child2 overrides
- the central repo, but tries to run the help plugin -->
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-help-plugin</artifactId>
- <!-- use 2.0.2-snap until it's released, due to
bug described above -->
- <version>2.0.2</version>
- <executions>
- <execution>
- <phase>generate-resources</phase>
- <goals>
- <goal>effective-pom</goal>
- </goals>
- <configuration>
-
<output>${project.build.directory}/effective-pom-child1.xml</output>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
</project>
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0043/child2/pom.xml
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0043/child2/pom.xml?rev=619709&r1=619708&r2=619709&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0043/child2/pom.xml
(original)
+++
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0043/child2/pom.xml
Thu Feb 7 16:42:53 2008
@@ -1,8 +1,12 @@
<project>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.maven.its.it0043</groupId>
+ <parent>
+ <groupId>org.apache.maven.its.it0043</groupId>
+ <artifactId>maven-it-it0043-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
<artifactId>maven-it-it0043-child2</artifactId>
- <version>1.0-SNAPSHOT</version>
<name>Maven Integration Test :: it0043 Child2</name>
<description>Test for repository inheritence - ensure using the same id
overrides the defaults</description>
@@ -37,24 +41,4 @@
<version>3.8.1</version>
</dependency>
</dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-help-plugin</artifactId>
- <version>2.0.2</version> <!-- Removing this
will cause MNG-900 -->
- <executions>
- <execution>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>effective-pom</goal>
- </goals>
- <configuration>
- <output>${project.build.directory}/effective-pom.xml</output>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
</project>
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0095/sub1/pom.xml
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0095/sub1/pom.xml?rev=619709&r1=619708&r2=619709&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0095/sub1/pom.xml
(original)
+++
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0095/sub1/pom.xml
Thu Feb 7 16:42:53 2008
@@ -10,6 +10,7 @@
<build>
<defaultGoal>integration-test</defaultGoal>
<plugins>
+ <!--
<plugin>
<artifactId>maven-help-plugin</artifactId>
<configuration>
@@ -25,6 +26,7 @@
</execution>
</executions>
</plugin>
+ -->
<plugin>
<artifactId>maven-verifier-plugin</artifactId>
<executions>
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0100/parent/child/pom.xml
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0100/parent/child/pom.xml?rev=619709&r1=619708&r2=619709&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0100/parent/child/pom.xml
(original)
+++
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0100/parent/child/pom.xml
Thu Feb 7 16:42:53 2008
@@ -15,6 +15,7 @@
<build>
<plugins>
+ <!--
<plugin>
<artifactId>maven-help-plugin</artifactId>
<executions>
@@ -29,6 +30,7 @@
</execution>
</executions>
</plugin>
+ -->
<plugin>
<artifactId>maven-verifier-plugin</artifactId>
<executions>
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0102/pom.xml
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0102/pom.xml?rev=619709&r1=619708&r2=619709&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0102/pom.xml
(original)
+++
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0102/pom.xml
Thu Feb 7 16:42:53 2008
@@ -10,6 +10,7 @@
<version>1.0</version>
<build>
<plugins>
+ <!--
<plugin>
<artifactId>maven-help-plugin</artifactId>
<executions>
@@ -25,6 +26,7 @@
</execution>
</executions>
</plugin>
+ -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0129-resourcesForAPluginProvidedAsAPluginDependency/extension/pom.xml
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0129-resourcesForAPluginProvidedAsAPluginDependency/extension/pom.xml?rev=619709&r1=619708&r2=619709&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0129-resourcesForAPluginProvidedAsAPluginDependency/extension/pom.xml
(original)
+++
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0129-resourcesForAPluginProvidedAsAPluginDependency/extension/pom.xml
Thu Feb 7 16:42:53 2008
@@ -14,7 +14,7 @@
<execution>
<phase>process-resources</phase>
<goals>
- <goal>attached</goal>
+ <goal>single</goal>
</goals>
<configuration>
<descriptors>
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-1412-DependenciesOrder/src/test/java/org/apache/maven/its/itmng1412/ITmng1412DependenciesOrderTest.java
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-1412-DependenciesOrder/src/test/java/org/apache/maven/its/itmng1412/ITmng1412DependenciesOrderTest.java?rev=619709&r1=619708&r2=619709&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-1412-DependenciesOrder/src/test/java/org/apache/maven/its/itmng1412/ITmng1412DependenciesOrderTest.java
(original)
+++
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-1412-DependenciesOrder/src/test/java/org/apache/maven/its/itmng1412/ITmng1412DependenciesOrderTest.java
Thu Feb 7 16:42:53 2008
@@ -50,6 +50,9 @@
found.append( extensionName );
}
}
+
+ System.out.println( "Expected:\n\n" + expected + "\n\nFound:\n\n" +
found );
+
assertEquals( "dependencies order in classpath should match pom.xml",
expected, found.toString() );
}
}