Author: carlos
Date: Tue Apr 18 22:50:49 2006
New Revision: 395144

URL: http://svn.apache.org/viewcvs?rev=395144&view=rev
Log:
[MSUREFIRE-86] Make surefire compile under Java 1.3, added profile for JDK 1.3

Modified:
    maven/surefire/trunk/pom.xml

Modified: maven/surefire/trunk/pom.xml
URL: 
http://svn.apache.org/viewcvs/maven/surefire/trunk/pom.xml?rev=395144&r1=395143&r2=395144&view=diff
==============================================================================
--- maven/surefire/trunk/pom.xml (original)
+++ maven/surefire/trunk/pom.xml Tue Apr 18 22:50:49 2006
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<project>
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
   <parent>
     <artifactId>maven-parent</artifactId>
     <groupId>org.apache.maven</groupId>
@@ -87,4 +88,79 @@
       <url>scp://minotaur.apache.org/www/maven.apache.org/surefire</url>
     </site>
   </distributionManagement>
+
+  <profiles>
+    <profile>
+      <id>jdk1.3</id>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <configuration>
+              <fork>true</fork>
+              <compilerVersion>1.3</compilerVersion>
+              <executable>${JAVA_1_3_HOME}/bin/javac</executable>
+            </configuration>
+          </plugin>
+          <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <forkMode>once</forkMode>
+              <jvm>${JAVA_1_3_HOME}/bin/java</jvm>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>nojdk1.3</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>java1.3-validate</id>
+                <phase>validate</phase>
+                <configuration>
+                  <tasks>
+                    <echo/>
+                    <echo>=== WARNING: You are not building with Java 1.3 as 
required ===</echo>
+                    <echo>Set JAVA_1_3_HOME pointing to the JDK 1.3 
installation folder</echo>
+                    <echo>and run Maven with -Pjdk1.3 to activate the Java 1.3 
profile</echo>
+                    <echo>Building anyway.</echo>
+                    <echo/>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+              <execution>
+                <id>java1.3-deploy</id>
+                <phase>deploy</phase>
+                <configuration>
+                  <tasks>
+                    <echo/>
+                    <echo>=== ERROR: You are not building with Java 1.3 as 
required ===</echo>
+                    <echo>Set JAVA_1_3_HOME pointing to the JDK 1.3 
installation folder</echo>
+                    <echo>and run Maven with -Pjdk1.3 to activate the Java 1.3 
profile</echo>
+                    <echo/>
+                    <fail>ERROR: You can not deploy without using Java  
1.3.</fail>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
 </project>


Reply via email to