Author: buildbot
Date: Fri Jan 9 17:14:20 2015
New Revision: 935625
Log:
Staging update by buildbot for commons
Modified:
websites/staging/commons/trunk/content/ (props changed)
websites/staging/commons/trunk/content/commons-parent-pom.html
Propchange: websites/staging/commons/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Jan 9 17:14:20 2015
@@ -1 +1 @@
-1650596
+1650603
Modified: websites/staging/commons/trunk/content/commons-parent-pom.html
==============================================================================
--- websites/staging/commons/trunk/content/commons-parent-pom.html (original)
+++ websites/staging/commons/trunk/content/commons-parent-pom.html Fri Jan 9
17:14:20 2015
@@ -509,26 +509,32 @@
<p>
For this reason
<a class="externalLink"
href="http://svn.apache.org/repos/asf/commons/proper/commons-parent/trunk/pom.xml">commons-parent</a>
- provides <i>profiles</i> for compiling/testing under different Java
versions:
+ provides <i>profiles</i> for compiling/testing under different Java
versions (correct as of version 36):
</p>
<ul>
-<li><tt>java-1.3</tt> for compiling and testing using Java 1.3</li>
+<li><tt>java-1.3</tt> for compiling and testing using Java 1.3 (uses property
JAVA_1_3_HOME)</li>
-<li><tt>java-1.4</tt> for compiling and testing using Java 1.4</li>
+<li><tt>java-1.4</tt> for compiling and testing using Java 1.4 (uses property
JAVA_1_4_HOME)</li>
-<li><tt>java-1.5</tt> for compiling and testing using Java 1.5</li>
+<li><tt>java-1.5</tt> for compiling and testing using Java 1.5 (uses property
JAVA_1_5_HOME)</li>
-<li><tt>java-1.6</tt> for compiling and testing using Java 1.6</li>
+<li><tt>java-1.6</tt> for compiling and testing using Java 1.6 (uses property
JAVA_1_6_HOME)</li>
+
+<li><tt>java-1.7</tt> for compiling and testing using Java 1.7 (uses property
JAVA_1_7_HOME)</li>
+
+<li><tt>java-1.8</tt> for compiling and testing using Java 1.8 (uses property
JAVA_1_8_HOME)</li>
+
+<li><tt>java-1.9</tt> for compiling and testing using Java 1.9 (uses property
JAVA_1_9_HOME)</li>
</ul>
<p>
- In order for these profiles to work, you need to configure the
<tt>JAVA_1_3_HOME</tt>,
- <tt>JAVA_1_4_HOME</tt>, <tt>JAVA_1_5_HOME</tt> and
<tt>JAVA_1_6_HOME</tt>
- properties in your <tt>settings.xml</tt> file (or as environment
variables or even command-line properties).
+ In order for these profiles to work, you need to configure the
relevant <tt>JAVA_1_N_HOME</tt>
+ properties in your <tt>settings.xml</tt> file.
+ [There is no need to configure properties for profiles you don't
need.]
Each property should be set to the <tt>directory</tt> where the
relevant version of the JDK is installed.
- The Maven compiler plugin has
+ Note: the Maven compiler plugin has
<a class="externalLink"
href="http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html">documentation
on how this works</a>.
</p>
@@ -547,30 +553,29 @@
<pre>
<settings>
<profiles>
+ <!-- Sample profiles showing different ways of defining the
properties -->
<profile>
- <id>java-1.3</id>
- <properties>
-
<JAVA_1_3_HOME>C:\j\jdk1.3.1_18</JAVA_1_3_HOME>
- </properties>
- </profile>
- <profile>
- <id>java-1.4</id>
+ <id>java-1.5</id>
<properties>
-
<JAVA_1_4_HOME>C:\j\jdk1.4.2_19</JAVA_1_4_HOME>
+ <!-- sample Windows definition -->
+
<JAVA_1_5_HOME>C:\jdk1.5.0_22</JAVA_1_5_HOME>
</properties>
</profile>
<profile>
- <id>java-1.5</id>
+ <id>java-1.6</id>
<properties>
-
<JAVA_1_5_HOME>C:\j\jdk1.5.0_22</JAVA_1_5_HOME>
+ <!-- Sample Unix definition -->
+
<JAVA_1_6_HOME>/home/jenkins/tools/java/latest1.6</JAVA_1_6_HOME>
</properties>
</profile>
<profile>
- <id>java-1.6</id>
+ <id>java-1.7</id>
<properties>
-
<JAVA_1_6_HOME>C:\j\jdk1.6.0_17</JAVA_1_6_HOME>
+ <!-- sample definition using an OS environment
variable -->
+
<JAVA_1_7_HOME>${env.JAVA_1_7_HOME}</JAVA_1_7_HOME>
</properties>
</profile>
+ <!-- No need to define every possible java profile, only
the ones you want to use (and have JDKs for) -->
</profiles>
</settings>
</pre></div>
@@ -582,12 +587,23 @@
</p>
<p>
- Once you have configured those properties you can, for example,
compile and test with Java 1.4 using the following command:
+ Once you have configured those properties you can, for example,
compile and test with Java 1.6 using the following command:
+ </p>
+
+<div class="source">
+<pre>
+ mvn clean test -Pjava-1.6
+ </pre></div>
+
+<p>
+ If you don't want to update the <tt>settings.xml</tt> file, you can
provide the property definition on the command-line.
+ (However for frequent use it is easier to update the settings file)
+ For example:
</p>
<div class="source">
<pre>
- mvn -Pjava-1.4 clean test
+ mvn clean test -Pjava-1.6
-DJAVA_1_6_HOME=/home/jenkins/tools/java/latest1.6
</pre></div>
</div>