hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r954207 - /httpcomponents/httpcore/trunk/httpcore/pom.xml
Date Sun, 13 Jun 2010 12:08:37 GMT
Author: sebb
Date: Sun Jun 13 12:08:37 2010
New Revision: 954207

URL: http://svn.apache.org/viewvc?rev=954207&view=rev
Log:
Allow updated versions of JUnit to be used

Modified:
    httpcomponents/httpcore/trunk/httpcore/pom.xml

Modified: httpcomponents/httpcore/trunk/httpcore/pom.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/pom.xml?rev=954207&r1=954206&r2=954207&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/pom.xml (original)
+++ httpcomponents/httpcore/trunk/httpcore/pom.xml Sun Jun 13 12:08:37 2010
@@ -49,15 +49,6 @@
     </license>
   </licenses>
 
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -71,8 +62,19 @@
     <httpcore.compiler.javac />
     <httpcore.surefire.java />
     <httpcore.surefire.version>2.4.3</httpcore.surefire.version>
+    <!-- This property can be omitted if/when the parent POM is updated -->
+    <junit.version>4.8.1</junit.version>
   </properties>
 
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>${junit.version}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
   <build>
     <resources>
       <resource>
@@ -124,6 +126,12 @@
         <version>${httpcore.surefire.version}</version>
         <configuration>
           <jvm>${httpcore.surefire.java}</jvm>
+          <excludes>
+            <exclude>**/*$*</exclude><!-- Re-specify the default, i.e. inner
classes -->
+            <!-- These classes don't have any tests. They are ignored by JUnit 3.8, but
not by JUnit 4.x -->
+            <exclude>org/apache/http/mockup/TestHttpServer.java</exclude>
+            <exclude>org/apache/http/mockup/TestHttpClient.java</exclude>
+          </excludes>
         </configuration>
       </plugin>
       <plugin>
@@ -217,6 +225,8 @@
         <httpcore.surefire.java>${JAVA_1_3_HOME}/bin/java</httpcore.surefire.java>
         <!-- Later versions of Surefire don't run with Java 1.3 -->
         <httpcore.surefire.version>2.2</httpcore.surefire.version>
+        <!-- Later versions of JUnit don't run with Java 1.3 -->
+        <junit.version>3.8.1</junit.version>
       </properties>
     </profile>
     <!--
@@ -230,8 +240,22 @@
         <httpcore.compiler.compilerVersion>1.4</httpcore.compiler.compilerVersion>
         <httpcore.compiler.javac>${JAVA_1_4_HOME}/bin/javac</httpcore.compiler.javac>
         <httpcore.surefire.java>${JAVA_1_4_HOME}/bin/java</httpcore.surefire.java>
+        <!-- Later versions of JUnit don't run with Java 1.4 -->
+        <junit.version>3.8.2</junit.version>
+      </properties>
+    </profile>
+    <!-- 
+       Profile to ensure correct version of JUnit is used if the default Java is 1.4
+       Maven2 requires 1.4+ so no need for equivalent 1.3 version.
+      -->
+    <profile>
+      <activation>
+        <jdk>1.4</jdk>
+      </activation>
+      <properties>
+        <!-- Later versions of JUnit don't run with Java 1.4 -->
+        <junit.version>3.8.2</junit.version>
       </properties>
     </profile>
   </profiles>
-
 </project>



Mime
View raw message