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/01/20 20:03:07 UTC
svn commit: r736067 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/ resources/mng-0761/ resources/mng-0761/src/
resources/mng-0768/ resources/mng-0773/ resources/mng-0773/subproject/
resources/mng-0773/subpr...
Author: bentmann
Date: Tue Jan 20 11:03:06 2009
New Revision: 736067
URL: http://svn.apache.org/viewvc?rev=736067&view=rev
Log:
o Decoupled ITs from production plugins
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0761/main.jar (with props)
Removed:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0761/src/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0773/subproject/src/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0814/src/
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0761MissingSnapshotDistRepoTest.java
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0768OfflineModeTest.java
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0773SettingsProfileReactorPollutionTest.java
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0781PluginConfigVsExecConfigTest.java
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0814ExplicitProfileActivationTest.java
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0761/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0768/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0773/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0773/subproject/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0814/pom.xml
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0761MissingSnapshotDistRepoTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0761MissingSnapshotDistRepoTest.java?rev=736067&r1=736066&r2=736067&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0761MissingSnapshotDistRepoTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0761MissingSnapshotDistRepoTest.java Tue Jan 20 11:03:06 2009
@@ -36,7 +36,7 @@
public MavenITmng0761MissingSnapshotDistRepoTest()
{
- super( "(2.0.2,)" );
+ super();
}
/**
@@ -47,14 +47,16 @@
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0761" );
+
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.deleteArtifact( "org.apache.maven", "maven-it-it0062-SNAPSHOT", "1.0", "jar" );
- verifier.executeGoal( "deploy" );
- verifier.assertFilePresent( "target/classes/org/apache/maven/it0062/Person.class" );
- verifier.assertFilePresent( "target/maven-it-it0062-1.0-SNAPSHOT.jar" );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.deleteArtifacts( "org.apache.maven.its.mng0761" );
+ verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
+ verifier.assertFilePresent( "target/repo/org/apache/maven/its/mng0761/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.jar" );
}
-}
+}
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0768OfflineModeTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0768OfflineModeTest.java?rev=736067&r1=736066&r2=736067&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0768OfflineModeTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0768OfflineModeTest.java Tue Jan 20 11:03:06 2009
@@ -47,6 +47,8 @@
{
// phase 1: run build in online mode to fill local repo
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
verifier.deleteArtifacts( "org.apache.maven.its.it0069" );
verifier.setLogFileName( "log1.txt" );
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" );
@@ -58,6 +60,8 @@
{
// phase 2: run build in offline mode to check it still passes (after deleting test repo, to be sure)
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
verifier.deleteDirectory( "repo" );
List cliOptions = new ArrayList();
cliOptions.add( "-o" );
@@ -72,6 +76,8 @@
{
// phase 3: delete test artifact and run build in offline mode to check it fails now
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
verifier.deleteArtifacts( "org.apache.maven.its.it0069" );
List cliOptions = new ArrayList();
cliOptions.add( "-o" );
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0773SettingsProfileReactorPollutionTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0773SettingsProfileReactorPollutionTest.java?rev=736067&r1=736066&r2=736067&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0773SettingsProfileReactorPollutionTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0773SettingsProfileReactorPollutionTest.java Tue Jan 20 11:03:06 2009
@@ -37,22 +37,22 @@
{
/**
- * Verify that profiles from settings.xml do not pollute module lists
- * across projects in a reactorized build.
+ * Verify that profiles from settings.xml do not pollute module lists across projects in a reactorized build.
*/
public void testitMNG773()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0773" );
+
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
List cliOptions = new ArrayList();
- cliOptions.add( "--settings settings.xml" );
+ cliOptions.add( "--settings" );
+ cliOptions.add( "settings.xml" );
verifier.setCliOptions( cliOptions );
- verifier.executeGoal( "package" );
- verifier.assertFilePresent( "subproject/target/subproject-1.0.jar" );
+ verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
}
-}
+}
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0781PluginConfigVsExecConfigTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0781PluginConfigVsExecConfigTest.java?rev=736067&r1=736066&r2=736067&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0781PluginConfigVsExecConfigTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0781PluginConfigVsExecConfigTest.java Tue Jan 20 11:03:06 2009
@@ -42,12 +42,16 @@
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0781" );
+
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
verifier.executeGoal( "process-resources" );
- verifier.assertFilePresent( "target/exec-level.txt" );
- verifier.assertFilePresent( "target/resources-resources.txt" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
+
+ verifier.assertFilePresent( "target/exec-level.txt" );
+ verifier.assertFilePresent( "target/resources-resources.txt" );
}
}
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0814ExplicitProfileActivationTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0814ExplicitProfileActivationTest.java?rev=736067&r1=736066&r2=736067&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0814ExplicitProfileActivationTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0814ExplicitProfileActivationTest.java Tue Jan 20 11:03:06 2009
@@ -23,8 +23,7 @@
import org.apache.maven.it.util.ResourceExtractor;
import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Properties;
/**
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-814">MNG-814</a>.
@@ -43,16 +42,18 @@
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0814" );
+
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.0", "jar" );
- List cliOptions = new ArrayList();
- cliOptions.add( "-P test-profile" );
- verifier.setCliOptions( cliOptions );
- verifier.executeGoal( "compile" );
- verifier.assertFilePresent( "target/classes/org/apache/maven/it0067/Person.class" );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.getCliOptions().add( "-P" );
+ verifier.getCliOptions().add( "test-profile" );
+ verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
+ Properties props = verifier.loadProperties( "target/profile.properties" );
+ assertEquals( "PASSED", props.getProperty( "project.properties.testProp" ) );
}
-}
+}
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0761/main.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0761/main.jar?rev=736067&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0761/main.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0761/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0761/pom.xml?rev=736067&r1=736066&r2=736067&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0761/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0761/pom.xml Tue Jan 20 11:03:06 2009
@@ -1,15 +1,66 @@
+<?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>
<modelVersion>4.0.0</modelVersion>
- <name>Maven Integration Test :: it0062</name>
- <groupId>org.apache.maven.its.it0062</groupId>
- <artifactId>maven-it-it0062</artifactId>
- <description>Test that a deployment of a snapshot falls back to a non-snapshot repository if no snapshot repository is
- specified.</description>
+
+ <groupId>org.apache.maven.its.mng0761</groupId>
+ <artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
+
+ <name>Maven Integration Test :: MNG-761</name>
+ <description>
+ Test that a deployment of a snapshot falls back to a non-snapshot repository if no snapshot repository is
+ specified.
+ </description>
+
<distributionManagement>
<repository>
<id>repo</id>
- <url>file://localhost/${project.basedir}/target/test-repo</url>
+ <url>file://localhost/${project.basedir}/target/repo</url>
+ <uniqueVersion>false</uniqueVersion>
</repository>
</distributionManagement>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-artifact</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <mainFile>main.jar</mainFile>
+ </configuration>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>set</goal>
+ <goal>install</goal>
+ <goal>deploy</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0768/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0768/pom.xml?rev=736067&r1=736066&r2=736067&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0768/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0768/pom.xml Tue Jan 20 11:03:06 2009
@@ -22,11 +22,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.maven.its.it0069</groupId>
- <artifactId>maven-it-it0069</artifactId>
+ <groupId>org.apache.maven.its.mng0768</groupId>
+ <artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
- <name>Maven Integration Test :: it0069</name>
+ <name>Maven Integration Test :: MNG-768</name>
<description>Test offline mode.</description>
<dependencies>
@@ -45,7 +45,7 @@
<checksumPolicy>ignore</checksumPolicy>
</releases>
<snapshots>
- <checksumPolicy>ignore</checksumPolicy>
+ <enabled>false</enabled>
</snapshots>
</repository>
</repositories>
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0773/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0773/pom.xml?rev=736067&r1=736066&r2=736067&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0773/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0773/pom.xml Tue Jan 20 11:03:06 2009
@@ -1,12 +1,36 @@
+<?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>
<modelVersion>4.0.0</modelVersion>
- <name>Maven Integration Test :: it0058</name>
- <groupId>org.apache.maven.its.it0058</groupId>
- <artifactId>maven-it-it0058</artifactId>
- <description>Verify that profiles from settings.xml do not pollute module lists
- across projects in a reactorized build.</description>
- <packaging>pom</packaging>
+
+ <groupId>org.apache.maven.its.mng0773</groupId>
+ <artifactId>parent</artifactId>
<version>1.0</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-773</name>
+ <description>
+ Verify that profiles from settings.xml do not pollute module lists across projects in a reactorized build.
+ </description>
<modules>
<module>subproject</module>
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0773/subproject/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0773/subproject/pom.xml?rev=736067&r1=736066&r2=736067&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0773/subproject/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0773/subproject/pom.xml Tue Jan 20 11:03:06 2009
@@ -1,18 +1,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
+
<parent>
- <groupId>org.apache.maven.its.it0058</groupId>
- <artifactId>maven-it-it0058</artifactId>
+ <groupId>org.apache.maven.its.mng0773</groupId>
+ <artifactId>parent</artifactId>
<version>1.0</version>
</parent>
+
<artifactId>subproject</artifactId>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <type>jar</type>
- <scope>test</scope>
- </dependency>
- </dependencies>
</project>
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0814/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0814/pom.xml?rev=736067&r1=736066&r2=736067&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0814/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0814/pom.xml Tue Jan 20 11:03:06 2009
@@ -1,22 +1,63 @@
+<?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>
<modelVersion>4.0.0</modelVersion>
- <name>Maven Integration Test :: it0067</name>
- <groupId>org.apache.maven.its.it0067</groupId>
- <artifactId>maven-it-it0067</artifactId>
- <description>Test activation of a profile from the command line.</description>
+
+ <groupId>org.apache.maven.its.mng0814</groupId>
+ <artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
+
+ <name>Maven Integration Test :: MNG-814</name>
+ <description>Test activation of a profile from the command line.</description>
<profiles>
<profile>
<id>test-profile</id>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- </dependency>
- </dependencies>
+ <properties>
+ <testProp>PASSED</testProp>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-expression</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>eval</goal>
+ </goals>
+ <configuration>
+ <outputFile>target/profile.properties</outputFile>
+ <expressions>
+ <expression>project/properties</expression>
+ </expressions>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</profile>
</profiles>
</project>