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/06 19:59:00 UTC

svn commit: r732057 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/MavenIT0038Test.java resources/it0038/pom.xml resources/it0038/project/pom2.xml resources/it0038/project/src/

Author: bentmann
Date: Tue Jan  6 10:59:00 2009
New Revision: 732057

URL: http://svn.apache.org/viewvc?rev=732057&view=rev
Log:
o Decoupled it0038 from production plugins

Removed:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0038/project/src/
Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0038Test.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0038/pom.xml
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0038/project/pom2.xml

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0038Test.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0038Test.java?rev=732057&r1=732056&r2=732057&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0038Test.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0038Test.java Tue Jan  6 10:59:00 2009
@@ -23,8 +23,6 @@
 import org.apache.maven.it.util.ResourceExtractor;
 
 import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
 
 /**
  * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-607">MNG-607</a>.
@@ -44,15 +42,18 @@
         throws Exception
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0038" );
+
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        List cliOptions = new ArrayList();
-        cliOptions.add( "-f project/pom2.xml" );
-        verifier.setCliOptions( cliOptions );
-        verifier.executeGoal( "package" );
-        verifier.assertFilePresent( "project/target/maven-it-it0038-1.0-build2.jar" );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "project/target" );
+        verifier.getCliOptions().add( "-f" );
+        verifier.getCliOptions().add( "project/pom2.xml" );
+        verifier.executeGoal( "validate" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
+        verifier.assertFilePresent( "project/target/passed.log" );
+        verifier.assertFileNotPresent( "target/failed.log" );
     }
-}
 
+}

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0038/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0038/pom.xml?rev=732057&r1=732056&r2=732057&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0038/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0038/pom.xml Tue Jan  6 10:59:00 2009
@@ -1,19 +1,57 @@
+<?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 :: it0038</name> 
+
   <groupId>org.apache.maven.its.it0038</groupId>
-  <artifactId>maven-it-it0038</artifactId>
-  <description>Test building project from outside the project directory using '-f'
-        option</description>
+  <artifactId>test</artifactId>
+  <version>0.1</version>
   <packaging>jar</packaging>
-  <version>1.0</version>
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <type>jar</type>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
+
+  <name>Maven Integration Test :: it0038</name> 
+  <description>
+  	Test building project from outside the project directory using '-f' option
+  </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/failed.log</logFile>
+          <string>This should not get executed, should have taken the other POM</string>
+        </configuration>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>log-string</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0038/project/pom2.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0038/project/pom2.xml?rev=732057&r1=732056&r2=732057&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0038/project/pom2.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0038/project/pom2.xml Tue Jan  6 10:59:00 2009
@@ -1,16 +1,57 @@
+<?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.it0038</groupId>
-  <artifactId>maven-it-it0038</artifactId>
+  <artifactId>test</artifactId>
+  <version>0.2</version>
   <packaging>jar</packaging>
-  <version>1.0-build2</version>
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <type>jar</type>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
+
+  <name>Maven Integration Test :: it0038</name> 
+  <description>
+    Test building project from outside the project directory using '-f' option
+  </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/passed.log</logFile>
+          <string>PASSED</string>
+        </configuration>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>log-string</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>