Author: bentmann
Date: Sun Apr 11 22:40:58 2010
New Revision: 933005
URL: http://svn.apache.org/viewvc?rev=933005&view=rev
Log:
o Decoupled IT from production plugins
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4189UniqueVersionSnapshotTest.java
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4189/dependent-on-newer-timestamp-pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4189/pom.xml
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4189UniqueVersionSnapshotTest.java
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4189UniqueVersionSnapshotTest.java?rev=933005&r1=933004&r2=933005&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4189UniqueVersionSnapshotTest.java
(original)
+++
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4189UniqueVersionSnapshotTest.java
Sun Apr 11 22:40:58 2010
@@ -31,12 +31,13 @@ import org.apache.maven.it.util.Resource
public class MavenITmng4189UniqueVersionSnapshotTest
extends AbstractMavenIntegrationTestCase
{
+
public MavenITmng4189UniqueVersionSnapshotTest()
{
- super( "[2.2.1,)" );
+ super( "[2.2.1,),[3.0-alpha-3,)" );
}
- public void testmng4189()
+ public void testit()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/mng-4189" );
@@ -45,45 +46,40 @@ public class MavenITmng4189UniqueVersion
verifier.setAutoclean( false );
verifier.deleteDirectory( "target" );
verifier.deleteArtifacts( "org.apache.maven.its.mng4189" );
- Properties filterProps = verifier.newDefaultFilterProperties();
- verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8",
filterProps );
+ verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8",
verifier.newDefaultFilterProperties() );
verifier.getCliOptions().add( "--settings" );
verifier.getCliOptions().add( "settings.xml" );
-
+
// depend on
org.apache.maven.its.mng4189:dep:1.0-20090608.090416-1:jar
- // which contains add() method
verifier.setLogFileName( "log-1.txt" );
- verifier.executeGoal( "compile" );
+ verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
-
+
+ Properties checksums = verifier.loadProperties(
"target/checksum.properties" );
+ assertEquals( "da2e54f69a9ba120f9211c476029f049967d840c",
checksums.getProperty( "dep-1.0-SNAPSHOT.jar" ) );
+
+ // depend on
org.apache.maven.its.mng4189:dep:1.0-20090608.090416-2:jar
verifier.deleteDirectory( "target" );
verifier.getCliOptions().add( "-f" );
verifier.getCliOptions().add( "dependent-on-newer-timestamp-pom.xml" );
verifier.setLogFileName( "log-2.txt" );
- try
- {
- // depend on
org.apache.maven.its.mng4189:dep:1.0-20090608.090532-2-1:jar
- // which DOES NOT contains add() method
- verifier.executeGoal( "compile" );
- fail( "Build should have failed due to compile errors!" );
- }
- catch ( VerificationException e )
- {
- assertTrue( true );
- }
- verifier.verifyTextInLog(
"org.apache.maven.plugin.CompilationFailureException: Compilation failure" );
-
- verifier.deleteDirectory( "target" );
-
+ verifier.executeGoal( "validate" );
+ verifier.verifyErrorFreeLog();
+
+ checksums = verifier.loadProperties( "target/checksum.properties" );
+ assertEquals( "835979c28041014c5fd55daa15302d92976924a7",
checksums.getProperty( "dep-1.0-SNAPSHOT.jar" ) );
+
// revert back to
org.apache.maven.its.mng4189:dep:1.0-20090608.090416-1:jar
- // which contains the add() method
+ verifier.deleteDirectory( "target" );
verifier.getCliOptions().remove( "-f" );
verifier.getCliOptions().remove(
"dependent-on-newer-timestamp-pom.xml" );
verifier.setLogFileName( "log-3.txt" );
- verifier.executeGoal( "compile" );
+ verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
- verifier.deleteArtifacts( "org.apache.maven.its.mng4189" );
+ checksums = verifier.loadProperties( "target/checksum.properties" );
+ assertEquals( "da2e54f69a9ba120f9211c476029f049967d840c",
checksums.getProperty( "dep-1.0-SNAPSHOT.jar" ) );
}
+
}
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4189/dependent-on-newer-timestamp-pom.xml
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4189/dependent-on-newer-timestamp-pom.xml?rev=933005&r1=933004&r2=933005&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4189/dependent-on-newer-timestamp-pom.xml
(original)
+++
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4189/dependent-on-newer-timestamp-pom.xml
Sun Apr 11 22:40:58 2010
@@ -1,12 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<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.mng4189</groupId>
<artifactId>consumer</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
+
<name>consumer of 1.0-20090608.090532-2</name>
- <url>http://maven.apache.org</url>
+
<dependencies>
<dependency>
<groupId>org.apache.maven.its.mng4189</groupId>
@@ -14,4 +37,26 @@
<version>1.0-20090608.090532-2</version>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+
<compileClassPathChecksums>target/checksum.properties</compileClassPathChecksums>
+ <significantPathLevels>1</significantPathLevels>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4189/pom.xml
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4189/pom.xml?rev=933005&r1=933004&r2=933005&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4189/pom.xml
(original)
+++
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4189/pom.xml
Sun Apr 11 22:40:58 2010
@@ -1,12 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
<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.mng4189</groupId>
<artifactId>consumer</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
+
<name>consumer of 1.0-20090608.090416-1</name>
- <url>http://maven.apache.org</url>
+
<dependencies>
<dependency>
<groupId>org.apache.maven.its.mng4189</groupId>
@@ -14,4 +37,26 @@
<version>1.0-20090608.090416-1</version>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+
<compileClassPathChecksums>target/checksum.properties</compileClassPathChecksums>
+ <significantPathLevels>1</significantPathLevels>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>