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/10 11:13:59 UTC
svn commit: r742925 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/MavenITmng3023ReactorDependencyResolutionTest.java
resources/mng-3023/consumer/pom.xml resources/mng-3023/dependency/pom.xml
Author: bentmann
Date: Tue Feb 10 10:13:50 2009
New Revision: 742925
URL: http://svn.apache.org/viewvc?rev=742925&view=rev
Log:
o Fixed IT to properly work on Windows
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3023ReactorDependencyResolutionTest.java
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3023/consumer/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3023/dependency/pom.xml
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3023ReactorDependencyResolutionTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3023ReactorDependencyResolutionTest.java?rev=742925&r1=742924&r2=742925&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3023ReactorDependencyResolutionTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3023ReactorDependencyResolutionTest.java Tue Feb 10 10:13:50 2009
@@ -56,8 +56,9 @@
// First pass. Make sure the dependency cannot be resolved.
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setLogFileName( "log-a.txt" );
- verifier.deleteArtifact( "org.apache.maven.its.mng3023", "dependency", "1", "jar" );
+ verifier.deleteArtifacts( "org.apache.maven.its.mng3023" );
try
{
@@ -77,7 +78,7 @@
/**
* Test that reactor projects are included in dependency resolution.
*
- * I this pass, the dependency artifact should have the file $(basedir)/dependency/target/classes
+ * I this pass, the dependency artifact should have the file $(basedir)/dependency/dependency-classes
* (a directory) associated with it, since the 'compile' phase has run. This location should be
* present in the compile classpath output from the maven-it-plugin-dependency-resolution:compile
* mojo execution.
@@ -88,16 +89,17 @@
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3023" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setLogFileName( "log-b.txt" );
- verifier.deleteArtifact( "org.apache.maven.its.mng3023", "dependency", "1", "jar" );
+ verifier.deleteArtifacts( "org.apache.maven.its.mng3023" );
verifier.executeGoal( "compile" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
List compileClassPath = verifier.loadLines( "consumer/target/compile.classpath", "UTF-8" );
- assertTrue( find( "dependency/target/classes", compileClassPath ) );
- assertFalse( find( "dependency-1.jar", compileClassPath ) );
+ assertTrue( compileClassPath.toString(), compileClassPath.contains( "dependency-classes" ) );
+ assertFalse( compileClassPath.toString(), compileClassPath.contains( "dependency-1.jar" ) );
}
/**
@@ -119,37 +121,25 @@
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.deleteArtifact( "org.apache.maven.its.mng3023", "dependency", "1", "jar" );
+ verifier.deleteArtifacts( "org.apache.maven.its.mng3023" );
+ verifier.setLogFileName( "log-c-1.txt" );
verifier.executeGoal( "install" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
List compileClassPath = verifier.loadLines( "consumer/target/compile.classpath", "UTF-8" );
- assertTrue( find( "dependency-1.jar", compileClassPath ) );
- assertFalse( find( "dependency/target/classes", compileClassPath ) );
+ assertTrue( compileClassPath.toString(), compileClassPath.contains( "dependency-1.jar" ) );
+ assertFalse( compileClassPath.toString(), compileClassPath.contains( "dependency-classes" ) );
+ verifier.setLogFileName( "log-c-2.txt" );
verifier.executeGoal( "initialize" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
compileClassPath = verifier.loadLines( "consumer/target/compile.classpath", "UTF-8" );
- assertTrue( find( "dependency-1.jar", compileClassPath ) );
- assertFalse( find( "dependency/target/classes", compileClassPath ) );
+ assertTrue( compileClassPath.toString(), compileClassPath.contains( "dependency-1.jar" ) );
+ assertFalse( compileClassPath.toString(), compileClassPath.contains( "dependency-classes" ) );
}
- private boolean find( String pathSubstr, List classPath )
- {
- for ( Iterator it = classPath.iterator(); it.hasNext(); )
- {
- String path = (String) it.next();
-
- if ( path.indexOf( pathSubstr ) > -1 )
- {
- return true;
- }
- }
-
- return false;
- }
}
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3023/consumer/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3023/consumer/pom.xml?rev=742925&r1=742924&r2=742925&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3023/consumer/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3023/consumer/pom.xml Tue Feb 10 10:13:50 2009
@@ -1,9 +1,9 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.apache.maven.its.mng3023</groupId>
- <artifactId>parent</artifactId>
- <version>1</version>
+ <groupId>org.apache.maven.its.mng3023</groupId>
+ <artifactId>parent</artifactId>
+ <version>1</version>
</parent>
<artifactId>consumer</artifactId>
@@ -31,6 +31,7 @@
</goals>
<configuration>
<compileClassPath>${project.build.directory}/compile.classpath</compileClassPath>
+ <significantPathLevels>1</significantPathLevels>
</configuration>
</execution>
</executions>
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3023/dependency/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3023/dependency/pom.xml?rev=742925&r1=742924&r2=742925&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3023/dependency/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3023/dependency/pom.xml Tue Feb 10 10:13:50 2009
@@ -1,10 +1,14 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.apache.maven.its.mng3023</groupId>
- <artifactId>parent</artifactId>
- <version>1</version>
+ <groupId>org.apache.maven.its.mng3023</groupId>
+ <artifactId>parent</artifactId>
+ <version>1</version>
</parent>
<artifactId>dependency</artifactId>
+
+ <build>
+ <outputDirectory>dependency-classes</outputDirectory>
+ </build>
</project>