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 2008/09/26 15:40:13 UTC

svn commit: r699321 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/it0063/ resources/it0063/jdk/ resources/it0063/jdk/lib/ resources/it0063/src/

Author: bentmann
Date: Fri Sep 26 06:40:13 2008
New Revision: 699321

URL: http://svn.apache.org/viewvc?rev=699321&view=rev
Log:
o Decoupled it0063 from production JDK

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0063/jdk/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0063/jdk/lib/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0063/jdk/lib/tools.jar   (with props)
Removed:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0063/src/
Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0063Test.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0063/pom.xml

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0063Test.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0063Test.java?rev=699321&r1=699320&r2=699321&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0063Test.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0063Test.java Fri Sep 26 06:40:13 2008
@@ -23,27 +23,30 @@
 import org.apache.maven.it.util.ResourceExtractor;
 
 import java.io.File;
+import java.util.List;
 
 public class MavenIT0063Test
     extends AbstractMavenIntegrationTestCase
 {
 
     /**
-     * Test the use of a system scoped dependency to tools.jar.
+     * Test the use of a system scoped dependency to a (fake) tools.jar.
      */
     public void testit0063()
         throws Exception
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0063" );
+
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "package" );
-        verifier.assertFilePresent( "target/classes/org/apache/maven/it0063/Person.class" );
-        verifier.assertFilePresent( "target/test-classes/org/apache/maven/it0063/PersonTest.class" );
-        verifier.assertFilePresent( "target/maven-it-it0063-1.0.jar" );
-        verifier.assertFilePresent( "target/maven-it-it0063-1.0.jar!/it0063.properties" );
+        verifier.getSystemProperties().setProperty( "jre.home", new File( testDir, "jdk/jre" ).getPath() );
+        verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution::compile" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
+        List lines = verifier.loadLines( "target/compile.txt", "UTF-8" );
+        assertEquals( 2, lines.size() );
+        assertEquals( new File( testDir, "jdk/lib/tools.jar").getCanonicalFile(), 
+                      new File( (String) lines.get(1) ).getCanonicalFile() );
     }
-}
 
+}

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0063/jdk/lib/tools.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0063/jdk/lib/tools.jar?rev=699321&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0063/jdk/lib/tools.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0063/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0063/pom.xml?rev=699321&r1=699320&r2=699321&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0063/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0063/pom.xml Fri Sep 26 06:40:13 2008
@@ -1,38 +1,54 @@
+<?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 :: it0063</name> 
+
   <groupId>org.apache.maven.its.it0063</groupId>
   <artifactId>maven-it-it0063</artifactId>
-  <description>Test the use of a system scoped dependency to tools.jar.</description>
-  <packaging>jar</packaging>
   <version>1.0</version>
+  <packaging>jar</packaging>
+
+  <name>Maven Integration Test :: it0063</name> 
+  <description>Test the use of a system scoped dependency to a (fake) tools.jar.</description>
+
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
+      <groupId>com.sun</groupId>
+      <artifactId>tools</artifactId>
+      <version>1.4.2</version>
+      <scope>system</scope>
+      <systemPath>${jre.home}/../lib/tools.jar</systemPath>
     </dependency>
   </dependencies>
-  <profiles>
-    <profile>
-      <!-- NOTE: This will not be activated on OS X, since classes.jar already has the tools in it. -->
-      <id>default-tools.jar</id>
-      <activation>
-        <property>
-          <name>java.vendor</name>
-          <value>Sun Microsystems Inc.</value>
-        </property>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>com.sun</groupId>
-          <artifactId>tools</artifactId>
-          <version>1.4.2</version>
-          <scope>system</scope>
-          <systemPath>${java.home}/../lib/tools.jar</systemPath>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+        <configuration>
+          <compileClassPath>target/compile.txt</compileClassPath>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 </project>