You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2009/02/28 23:39:12 UTC
svn commit: r748929 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/ resources/mng-2668/ resources/mng-2668/project/
resources/mng-2668/tools/ resources/mng-2720/ resources/mng-2720/child1/
resources/mng-2720...
Author: bentmann
Date: Sat Feb 28 22:39:11 2009
New Revision: 748929
URL: http://svn.apache.org/viewvc?rev=748929&view=rev
Log:
o Decoupled ITs from production plugins
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/main/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/main.jar (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/main/main.properties (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/test/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/test.jar (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/test/test.properties (with props)
Removed:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/src/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child2/src/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child3/src/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/project-hierarchy/
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2668UsePluginDependenciesForSortingTest.java
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2720SiblingClasspathArtifactsTest.java
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/project/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/tools/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child2/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child3/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/pom.xml
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2668UsePluginDependenciesForSortingTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2668UsePluginDependenciesForSortingTest.java?rev=748929&r1=748928&r2=748929&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2668UsePluginDependenciesForSortingTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2668UsePluginDependenciesForSortingTest.java Sat Feb 28 22:39:11 2009
@@ -27,24 +27,27 @@
public class MavenITmng2668UsePluginDependenciesForSortingTest
extends AbstractMavenIntegrationTestCase
{
+
public MavenITmng2668UsePluginDependenciesForSortingTest()
{
// TODO: fix for 3.0+
super( "(2.1.0-M1,3.0-alpha-1)" ); // 2.1.0-M2+
}
- public void testmng2668()
+ public void testitMNG2668()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2668" );
+
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.setAutoclean( false );
verifier.deleteArtifacts( "org.apache.maven.its.mng2668" );
- verifier.executeGoal( "install" );
- verifier.assertArtifactPresent( "org.apache.maven.its.mng2668", "project", "1.0-SNAPSHOT", "jar" );
- verifier.assertArtifactPresent( "org.apache.maven.its.mng2668", "tools", "1.0-SNAPSHOT", "jar" );
+ verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
+
+ verifier.assertArtifactPresent( "org.apache.maven.its.mng2668", "project", "1.0-SNAPSHOT", "jar" );
+ verifier.assertArtifactPresent( "org.apache.maven.its.mng2668", "tools", "1.0-SNAPSHOT", "jar" );
}
}
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2720SiblingClasspathArtifactsTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2720SiblingClasspathArtifactsTest.java?rev=748929&r1=748928&r2=748929&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2720SiblingClasspathArtifactsTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2720SiblingClasspathArtifactsTest.java Sat Feb 28 22:39:11 2009
@@ -42,44 +42,61 @@
public class MavenITmng2720SiblingClasspathArtifactsTest
extends AbstractMavenIntegrationTestCase
{
+
public MavenITmng2720SiblingClasspathArtifactsTest()
throws InvalidVersionSpecificationException
{
super( "[2.1.0,)" );
}
- public void testIT ()
+ public void testIT()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2720" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-
- verifier.executeGoal( "package" );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "child2/target" );
+ verifier.deleteDirectory( "child3/target" );
+ verifier.executeGoal( "initialize" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
- List compileClassPath = verifier.loadLines( "child2/target/compile.classpath", "UTF-8" );
- assertTrue( find( "child1-1.jar", compileClassPath ) );
-
- compileClassPath = verifier.loadLines( "child3/target/compile.classpath", "UTF-8" );
- assertFalse( find( "child1-1.jar", compileClassPath ) );
- assertTrue( find( "child1-1-tests.jar", compileClassPath ) );
+ List classPath;
+
+ classPath = verifier.loadLines( "child2/target/compile.txt", "UTF-8" );
+ assertMainJar( classPath );
+
+ classPath = verifier.loadLines( "child2/target/runtime.txt", "UTF-8" );
+ assertMainJar( classPath );
+
+ classPath = verifier.loadLines( "child2/target/test.txt", "UTF-8" );
+ assertMainJar( classPath );
+ classPath = verifier.loadLines( "child3/target/compile.txt", "UTF-8" );
+ assertTestJar( classPath );
+
+ classPath = verifier.loadLines( "child3/target/runtime.txt", "UTF-8" );
+ assertTestJar( classPath );
+
+ classPath = verifier.loadLines( "child3/target/test.txt", "UTF-8" );
+ assertTestJar( classPath );
}
- private boolean find( String pathSubstr, List classPath )
+ private void assertMainJar( List classPath )
{
- for ( Iterator it = classPath.iterator(); it.hasNext(); )
- {
- String path = (String) it.next();
-
- if ( path.indexOf( pathSubstr ) > -1 )
- {
- return true;
- }
- }
-
- return false;
+ assertTrue( classPath.toString(), classPath.contains( "main.jar" ) );
+ assertFalse( classPath.toString(), classPath.contains( "main" ) );
+ assertFalse( classPath.toString(), classPath.contains( "test.jar" ) );
+ assertFalse( classPath.toString(), classPath.contains( "test" ) );
+ }
+
+ private void assertTestJar( List classPath )
+ {
+ assertFalse( classPath.toString(), classPath.contains( "main.jar" ) );
+ assertFalse( classPath.toString(), classPath.contains( "main" ) );
+ assertTrue( classPath.toString(), classPath.contains( "test.jar" ) );
+ assertFalse( classPath.toString(), classPath.contains( "test" ) );
}
+
}
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/pom.xml?rev=748929&r1=748928&r2=748929&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/pom.xml Sat Feb 28 22:39:11 2009
@@ -1,20 +1,19 @@
-<?xml version="1.0"?><project>
+<?xml version="1.0"?>
+<project>
<modelVersion>4.0.0</modelVersion>
+
<groupId>org.apache.maven.its.mng2668</groupId>
+ <artifactId>test-project</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
- <artifactId>test-project</artifactId>
- <name>test-project</name>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
+
+ <name>Maven Integration Test :: MNG-2539</name>
+ <description>
+ Verify that dependencies of plugins are considered by the project sorter for a reactor build.
+ </description>
+
<modules>
- <!-- note project goes first -->
+ <!-- NOTE: project goes first but the project sorter should recognize that tools needs to be build first -->
<module>project</module>
<module>tools</module>
</modules>
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/project/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/project/pom.xml?rev=748929&r1=748928&r2=748929&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/project/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/project/pom.xml Sat Feb 28 22:39:11 2009
@@ -1,16 +1,25 @@
-<?xml version="1.0"?><project>
+<?xml version="1.0"?>
+<project>
<modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.apache.maven.its.mng2668</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>test-project</artifactId>
</parent>
+
<artifactId>project</artifactId>
+
+ <name>Maven Integration Test :: MNG-2539 :: Plugin Dependency Consumer</name>
+ <description>
+ Verify that dependencies of plugins are considered by the project sorter for a reactor build.
+ </description>
+
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
- <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <artifactId>maven-it-plugin-artifact</artifactId>
<version>2.1-SNAPSHOT</version>
<dependencies>
<dependency>
@@ -19,11 +28,15 @@
<version>${project.version}</version>
</dependency>
</dependencies>
+ <configuration>
+ <mainFile>pom.xml</mainFile>
+ </configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
- <goal>compile</goal>
+ <goal>set</goal>
+ <goal>install</goal>
</goals>
</execution>
</executions>
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/tools/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/tools/pom.xml?rev=748929&r1=748928&r2=748929&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/tools/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2668/tools/pom.xml Sat Feb 28 22:39:11 2009
@@ -1,10 +1,40 @@
-<?xml version="1.0"?><project>
+<?xml version="1.0"?>
+<project>
<modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.apache.maven.its.mng2668</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>test-project</artifactId>
</parent>
+
<artifactId>tools</artifactId>
+
+ <name>Maven Integration Test :: MNG-2539 :: Plugin Dependency Provider</name>
+ <description>
+ Verify that dependencies of plugins are considered by the project sorter for a reactor build.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-artifact</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <mainFile>pom.xml</mainFile>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>set</goal>
+ <goal>install</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/main.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/main.jar?rev=748929&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/main.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/main/main.properties
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/main/main.properties?rev=748929&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/main/main.properties (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/main/main.properties Sat Feb 28 22:39:11 2009
@@ -0,0 +1 @@
+# makes sure parent directory is copied
\ No newline at end of file
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/main/main.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/main/main.properties
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/pom.xml?rev=748929&r1=748928&r2=748929&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/pom.xml Sat Feb 28 22:39:11 2009
@@ -1,6 +1,7 @@
<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>
+
<parent>
<groupId>org.apache.maven.its.mng2720</groupId>
<artifactId>project-hierarchy</artifactId>
@@ -11,24 +12,29 @@
<name>MNG-2720 Project Hierarchy 1 Child 1</name>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<build>
+ <outputDirectory>main</outputDirectory>
+ <testOutputDirectory>test</testOutputDirectory>
<plugins>
<plugin>
- <artifactId>maven-jar-plugin</artifactId>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-artifact</artifactId>
+ <version>2.1-SNAPSHOT</version>
<executions>
<execution>
- <id>test-jar</id>
+ <id>package</id>
+ <phase>validate</phase>
+ <configuration>
+ <mainFile>main.jar</mainFile>
+ <attachedFile>test.jar</attachedFile>
+ <artifactType>test-jar</artifactType>
+ <artifactClassifier>tests</artifactClassifier>
+ </configuration>
<goals>
- <goal>test-jar</goal>
+ <!-- emulate package phase -->
+ <goal>set</goal>
+ <goal>attach-pom</goal>
+ <goal>attach</goal>
</goals>
</execution>
</executions>
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/test.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/test.jar?rev=748929&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/test.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/test/test.properties
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/test/test.properties?rev=748929&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/test/test.properties (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/test/test.properties Sat Feb 28 22:39:11 2009
@@ -0,0 +1 @@
+# makes sure parent directory is copied
\ No newline at end of file
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/test/test.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child1/test/test.properties
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child2/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child2/pom.xml?rev=748929&r1=748928&r2=748929&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child2/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child2/pom.xml Sat Feb 28 22:39:11 2009
@@ -1,6 +1,7 @@
<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>
+
<parent>
<groupId>org.apache.maven.its.mng2720</groupId>
<artifactId>project-hierarchy</artifactId>
@@ -16,12 +17,7 @@
<groupId>org.apache.maven.its.mng2720</groupId>
<artifactId>child1</artifactId>
<version>1</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
+ <type>jar</type>
</dependency>
</dependencies>
</project>
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child3/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child3/pom.xml?rev=748929&r1=748928&r2=748929&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child3/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/child3/pom.xml Sat Feb 28 22:39:11 2009
@@ -1,6 +1,7 @@
<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>
+
<parent>
<groupId>org.apache.maven.its.mng2720</groupId>
<artifactId>project-hierarchy</artifactId>
@@ -18,11 +19,5 @@
<version>1</version>
<type>test-jar</type>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/pom.xml?rev=748929&r1=748928&r2=748929&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2720/pom.xml Sat Feb 28 22:39:11 2009
@@ -1,10 +1,12 @@
<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.mng2720</groupId>
<artifactId>project-hierarchy</artifactId>
- <packaging>pom</packaging>
<version>1</version>
+ <packaging>pom</packaging>
+
<name>MNG-2720 Project Hierarchy</name>
<modules>
@@ -21,13 +23,18 @@
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
- <id>compile-classpath</id>
- <phase>package</phase>
+ <id>package</id>
+ <phase>initialize</phase>
<goals>
<goal>compile</goal>
+ <goal>runtime</goal>
+ <goal>test</goal>
</goals>
<configuration>
- <compileClassPath>${project.build.directory}/compile.classpath</compileClassPath>
+ <compileClassPath>${project.build.directory}/compile.txt</compileClassPath>
+ <runtimeClassPath>${project.build.directory}/runtime.txt</runtimeClassPath>
+ <testClassPath>${project.build.directory}/test.txt</testClassPath>
+ <significantPathLevels>1</significantPathLevels>
</configuration>
</execution>
</executions>