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/07/23 23:12:48 UTC
svn commit: r797224 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/ resources/it0145/ resources/it0145/mod-a/
resources/it0145/mod-b/
Author: bentmann
Date: Thu Jul 23 21:12:48 2009
New Revision: 797224
URL: http://svn.apache.org/viewvc?rev=797224&view=rev
Log:
o Added IT for old-style reactor mode with includes/excludes
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0145ReactorWithIncludesExcludesTest.java (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-a/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-a/pom.xml (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-b/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-b/pom.xml (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/pom.xml (with props)
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java?rev=797224&r1=797223&r2=797224&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java Thu Jul 23 21:12:48 2009
@@ -359,6 +359,7 @@
suite.addTestSuite( MavenITmng0282NonReactorExecWhenProjectIndependentTest.class );
suite.addTestSuite( MavenITmng0249ResolveDepsFromReactorTest.class );
suite.addTestSuite( MavenITmng0095ReactorFailureBehaviorTest.class );
+ suite.addTestSuite( MavenIT0145ReactorWithIncludesExcludesTest.class );
suite.addTestSuite( MavenIT0144LifecycleExecutionOrderTest.class );
suite.addTestSuite( MavenIT0143TransitiveDependencyScopesTest.class );
suite.addTestSuite( MavenIT0142DirectDependencyScopesTest.class );
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0145ReactorWithIncludesExcludesTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0145ReactorWithIncludesExcludesTest.java?rev=797224&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0145ReactorWithIncludesExcludesTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0145ReactorWithIncludesExcludesTest.java Thu Jul 23 21:12:48 2009
@@ -0,0 +1,117 @@
+package org.apache.maven.it;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ *
+ * @author Benjamin Bentmann
+ */
+public class MavenIT0145ReactorWithIncludesExcludesTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenIT0145ReactorWithIncludesExcludesTest()
+ {
+ super( ALL_MAVEN_VERSIONS );
+ }
+
+ /**
+ * Test the old-style reactor mode with includes/excludes to locate projects.
+ */
+ public void testitDefaultIncludesExcludes()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0145" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.deleteDirectory( "mod-a/target" );
+ verifier.deleteDirectory( "mod-b/target" );
+ verifier.getCliOptions().add( "-r" );
+ verifier.setLogFileName( "log-defaults.txt" );
+ verifier.executeGoal( "validate" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ verifier.assertFileNotPresent( "target/touch.txt" );
+ verifier.assertFilePresent( "mod-a/target/touch-a.txt" );
+ verifier.assertFilePresent( "mod-b/target/touch-b.txt" );
+ }
+
+ /**
+ * Test the old-style reactor mode with includes/excludes to locate projects.
+ */
+ public void testitCustomIncludes()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0145" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.deleteDirectory( "mod-a/target" );
+ verifier.deleteDirectory( "mod-b/target" );
+ verifier.getCliOptions().add( "-r" );
+ verifier.getCliOptions().add( "-Dmaven.reactor.includes=mod-a/pom.xml" );
+ verifier.setLogFileName( "log-includes.txt" );
+ verifier.executeGoal( "validate" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ verifier.assertFileNotPresent( "target/touch.txt" );
+ verifier.assertFilePresent( "mod-a/target/touch-a.txt" );
+ verifier.assertFileNotPresent( "mod-b/target/touch-b.txt" );
+ }
+
+ /**
+ * Test the old-style reactor mode with includes/excludes to locate projects.
+ */
+ public void testitCustomExcludes()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0145" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.deleteDirectory( "mod-a/target" );
+ verifier.deleteDirectory( "mod-b/target" );
+ verifier.getCliOptions().add( "-r" );
+ verifier.getCliOptions().add( "-Dmaven.reactor.excludes=mod-a/pom.xml" );
+ verifier.setLogFileName( "log-excludes.txt" );
+ verifier.executeGoal( "validate" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ verifier.assertFilePresent( "target/touch.txt" );
+ verifier.assertFileNotPresent( "mod-a/target/touch-a.txt" );
+ verifier.assertFilePresent( "mod-b/target/touch-b.txt" );
+ }
+
+}
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0145ReactorWithIncludesExcludesTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0145ReactorWithIncludesExcludesTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-a/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-a/pom.xml?rev=797224&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-a/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-a/pom.xml Thu Jul 23 21:12:48 2009
@@ -0,0 +1,55 @@
+<?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>
+
+ <groupId>org.apache.maven.its.it0145</groupId>
+ <artifactId>mod-a</artifactId>
+ <version>0.1</version>
+
+ <name>Maven Integration Test :: MNG-???? :: Module A</name>
+ <description>
+ Test the old-style reactor mode with includes/excludes to locate projects.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-log-file</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <logFile>target/touch-a.txt</logFile>
+ </configuration>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>reset</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-a/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-a/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-b/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-b/pom.xml?rev=797224&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-b/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-b/pom.xml Thu Jul 23 21:12:48 2009
@@ -0,0 +1,55 @@
+<?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>
+
+ <groupId>org.apache.maven.its.it0145</groupId>
+ <artifactId>mod-b</artifactId>
+ <version>0.1</version>
+
+ <name>Maven Integration Test :: MNG-???? :: Module B</name>
+ <description>
+ Test the old-style reactor mode with includes/excludes to locate projects.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-log-file</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <logFile>target/touch-b.txt</logFile>
+ </configuration>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>reset</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-b/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/mod-b/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/pom.xml?rev=797224&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/pom.xml Thu Jul 23 21:12:48 2009
@@ -0,0 +1,55 @@
+<?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>
+
+ <groupId>org.apache.maven.its.it0145</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1</version>
+
+ <name>Maven Integration Test :: MNG-????</name>
+ <description>
+ Test the old-style reactor mode with includes/excludes to locate projects.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-log-file</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <logFile>target/touch.txt</logFile>
+ </configuration>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>reset</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0145/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision