You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ni...@apache.org on 2010/03/11 14:31:26 UTC
svn commit: r921843 - /commons/proper/commons-parent/trunk/pom.xml
Author: niallp
Date: Thu Mar 11 13:31:26 2010
New Revision: 921843
URL: http://svn.apache.org/viewvc?rev=921843&view=rev
Log:
Add profiles to compile and test with Java versions 1.3 1.4, 1.5 & 1.6
For example:
mvn -Pjava-1.3 clean test
mvn -Pjava-1.4 clean test
mvn -Pjava-1.5 clean test
mvn -Pjava-1.6 clean test
In order to use these profiles the JAVA_1_3_HOME, JAVA_1_4_HOME, JAVA_1_5_HOME and JAVA_1_6_HOME properties need to be configured settings.xml to point to the java locations
See http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html
(N.B. Although Java 1.6 is the latest release, 1.7 is supposed to out later this year - so the java-1.6 profile is added with that in mind)
Modified:
commons/proper/commons-parent/trunk/pom.xml
Modified: commons/proper/commons-parent/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/commons-parent/trunk/pom.xml?rev=921843&r1=921842&r2=921843&view=diff
==============================================================================
--- commons/proper/commons-parent/trunk/pom.xml (original)
+++ commons/proper/commons-parent/trunk/pom.xml Thu Mar 11 13:31:26 2010
@@ -149,6 +149,9 @@
<source>${maven.compile.source}</source>
<target>${maven.compile.target}</target>
<encoding>${commons.encoding}</encoding>
+ <fork>${commons.compiler.fork}</fork>
+ <compilerVersion>${commons.compiler.compilerVersion}</compilerVersion>
+ <executable>${commons.compiler.javac}</executable>
</configuration>
</plugin>
<plugin>
@@ -223,7 +226,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.5</version>
+ <version>${commons.surefire.version}</version>
</plugin>
<!-- Other plugins, alpha order by groupId and artifactId -->
<plugin>
@@ -249,6 +252,12 @@
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <jvm>${commons.surefire.java}</jvm>
+ </configuration>
+ </plugin>
+ <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
@@ -381,7 +390,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.5</version>
+ <version>${commons.surefire.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -574,6 +583,63 @@
</profile>
<!--
+ Profile for running the build using JDK 1.3
+ (JAVA_1_3_HOME needs to be configured in settings.xml)
+ -->
+ <profile>
+ <id>java-1.3</id>
+ <properties>
+ <commons.compiler.fork>true</commons.compiler.fork>
+ <commons.compiler.compilerVersion>1.3</commons.compiler.compilerVersion>
+ <commons.compiler.javac>${JAVA_1_3_HOME}/bin/javac</commons.compiler.javac>
+ <commons.surefire.java>${JAVA_1_3_HOME}/bin/java</commons.surefire.java>
+ <commons.surefire.version>2.2</commons.surefire.version>
+ </properties>
+ </profile>
+
+ <!--
+ Profile for running the build using JDK 1.4
+ (JAVA_1_4_HOME needs to be configured in settings.xml)
+ -->
+ <profile>
+ <id>java-1.4</id>
+ <properties>
+ <commons.compiler.fork>true</commons.compiler.fork>
+ <commons.compiler.compilerVersion>1.4</commons.compiler.compilerVersion>
+ <commons.compiler.javac>${JAVA_1_4_HOME}/bin/javac</commons.compiler.javac>
+ <commons.surefire.java>${JAVA_1_4_HOME}/bin/java</commons.surefire.java>
+ </properties>
+ </profile>
+
+ <!--
+ Profile for running the build using JDK 1.5
+ (JAVA_1_5_HOME needs to be configured in settings.xml)
+ -->
+ <profile>
+ <id>java-1.5</id>
+ <properties>
+ <commons.compiler.fork>true</commons.compiler.fork>
+ <commons.compiler.compilerVersion>1.5</commons.compiler.compilerVersion>
+ <commons.compiler.javac>${JAVA_1_5_HOME}/bin/javac</commons.compiler.javac>
+ <commons.surefire.java>${JAVA_1_5_HOME}/bin/java</commons.surefire.java>
+ </properties>
+ </profile>
+
+ <!--
+ Profile for running the build using JDK 1.6
+ (JAVA_1_6_HOME needs to be configured in settings.xml)
+ -->
+ <profile>
+ <id>java-1.6</id>
+ <properties>
+ <commons.compiler.fork>true</commons.compiler.fork>
+ <commons.compiler.compilerVersion>1.6</commons.compiler.compilerVersion>
+ <commons.compiler.javac>${JAVA_1_6_HOME}/bin/javac</commons.compiler.javac>
+ <commons.surefire.java>${JAVA_1_6_HOME}/bin/java</commons.surefire.java>
+ </properties>
+ </profile>
+
+ <!--
Profile to build all Commons "proper" components.
The trunks of all "proper" components can be checked out using:
@@ -635,6 +701,13 @@
<maven.compile.source>1.3</maven.compile.source>
<maven.compile.target>1.3</maven.compile.target>
+ <!-- compiler and surefire plugin settings for "java" profiles -->
+ <commons.compiler.fork>false</commons.compiler.fork>
+ <commons.compiler.compilerVersion />
+ <commons.compiler.javac />
+ <commons.surefire.java />
+ <commons.surefire.version>2.5</commons.surefire.version>
+
<!-- Default values for the download-page generation by commons-build-plugin -->
<commons.release.name>${project.artifactId}-${commons.release.version}</commons.release.name>
<commons.release.desc />