commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r676755 - in /commons/proper/discovery/trunk: build.xml pom.xml src/test/org/apache/commons/discovery/test/TestAll.java
Date Mon, 14 Jul 2008 22:44:18 GMT
Author: dennisl
Date: Mon Jul 14 15:44:17 2008
New Revision: 676755

URL: http://svn.apache.org/viewvc?rev=676755&view=rev
Log:
Adjust the class path for test so that Ant and Maven 2 can run the same tests.

Modified:
    commons/proper/discovery/trunk/build.xml
    commons/proper/discovery/trunk/pom.xml
    commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java

Modified: commons/proper/discovery/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/build.xml?rev=676755&r1=676754&r2=676755&view=diff
==============================================================================
--- commons/proper/discovery/trunk/build.xml (original)
+++ commons/proper/discovery/trunk/build.xml Mon Jul 14 15:44:17 2008
@@ -92,7 +92,7 @@
     <pathelement location="${build.home}/classes"/>
 
     <!-- test depends on the order of the following 3 lines: -->
-    <pathelement location="${build.home}/test"/>
+    <pathelement location="${build.home}/test-classes"/>
     <pathelement location="${build.home}/testAlt1"/>
     <pathelement location="${build.home}/testAlt2"/>
 
@@ -124,7 +124,7 @@
     <mkdir dir="${build.home}/conf"/>
     <mkdir dir="${build.home}/docs"/>
     <mkdir dir="${build.home}/docs/api"/>
-    <mkdir dir="${build.home}/test"/>
+    <mkdir dir="${build.home}/test-classes"/>
     <tstamp/>
     <copy todir="${build.home}/conf" filtering="on">
       <fileset dir="${conf.home}" includes="*.MF"/>
@@ -201,13 +201,13 @@
 
   <target name="compile.tests" depends="compile" description="Compile unit test cases">
     <javac  srcdir="${test.home}"
-           destdir="${build.home}/test"
+           destdir="${build.home}/test-classes"
              debug="${compile.debug}"
        deprecation="${compile.deprecation}"
           optimize="${compile.optimize}">
       <classpath refid="test.classpath"/>
     </javac>
-    <copy    todir="${build.home}/test" filtering="on">
+    <copy    todir="${build.home}/test-classes" filtering="on">
       <fileset dir="${test.home}" excludes="**/*.java"/>
     </copy>
     <copy    todir="${build.home}/testAlt1" filtering="on">

Modified: commons/proper/discovery/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/pom.xml?rev=676755&r1=676754&r2=676755&view=diff
==============================================================================
--- commons/proper/discovery/trunk/pom.xml (original)
+++ commons/proper/discovery/trunk/pom.xml Mon Jul 14 15:44:17 2008
@@ -120,15 +120,10 @@
     <testSourceDirectory>src/test</testSourceDirectory>
       <testResources>
         <testResource>
-          <directory>${basedir}/src</directory>
-          <includes>
-            <include>**/testResource</include>
-          </includes>
-        </testResource>
-        <testResource>
           <directory>${basedir}/src/test</directory>
           <includes>
             <include>**/*.properties</include>
+            <include>**/testResource</include>
             <include>META-INF/**</include>
           </includes>
         </testResource>
@@ -138,10 +133,14 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-              <includes>
-                <include>**/TestAll.java</include>
-              </includes>
+          <configuration>
+            <includes>
+              <include>**/TestAll.java</include>
+            </includes>
+            <additionalClasspathElements>
+              <additionalClasspathElement>${basedir}/src/testAlt1</additionalClasspathElement>
+              <additionalClasspathElement>${basedir}/src/testAlt2</additionalClasspathElement>
+            </additionalClasspathElements>
           </configuration>
         </plugin>
         <plugin>

Modified: commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java?rev=676755&r1=676754&r2=676755&view=diff
==============================================================================
--- commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java
(original)
+++ commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java
Mon Jul 14 15:44:17 2008
@@ -264,7 +264,7 @@
 
         String name = "testResource";
         
-        String partialPaths[] = { "/test/", "/testAlt1/", "/testAlt2/" };
+        String partialPaths[] = { "/test-classes/", "/testAlt1/", "/testAlt2/" };
         int expected = partialPaths.length;
         
         DiscoverResources discovery = new DiscoverResources(loaders);



Mime
View raw message