Author: buildbot
Date: Fri Jan  9 19:06:39 2015
New Revision: 935640

Log:
Staging update by buildbot for commons

Modified:
    websites/staging/commons/trunk/content/   (props changed)
    websites/staging/commons/trunk/content/building.html
    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 19:06:39 2015
@@ -1 +1 @@
-1650622
+1650631

Modified: websites/staging/commons/trunk/content/building.html
==============================================================================
--- websites/staging/commons/trunk/content/building.html (original)
+++ websites/staging/commons/trunk/content/building.html Fri Jan  9 19:06:39 
2015
@@ -306,13 +306,15 @@
 <p>
         To compile and run a component's tests with JDK 1.5.
         This assumes that the property JAVA_1_5_HOME has been defined in the 
Maven <tt>settings.xml</tt>
+        or has been defined as an OS environment variable (if both are 
defined, settings.xml takes precedence)
       </p>
       
 <div class="source">
 <pre>mvn clean test -Pjava-1.5</pre></div>
       
 <p>
-        To compile source and test files with Java 1.6 if settings.xml does 
not contain the property definitions:
+        To compile source and test files with Java 1.6 if settings.xml does 
not contain the property definitions 
+        (note this overrides any definition in settings.xml):
       </p>
       
 <div class="source">

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 
19:06:39 2015
@@ -505,7 +505,7 @@
           Using the <i>target</i> option ensures that the <tt>.class</tt> file 
format is compatible with
           the required Java version - but it does not prevent/catch the use of 
methods/classes which were
           introduced in later Java versions (because the build will use the 
current Java libraries by default).
-          The only way to ensure that components don't accidentally use 
classes/methods from a later
+          One way to ensure that components don't accidentally use 
classes/methods from a later
           version of Java is to compile and test using actual Java versions.
         </p>
         
@@ -534,7 +534,7 @@
         
 <p>
           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. 
+          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.
           Note: the Maven compiler plugin has 
@@ -584,13 +584,19 @@
         </pre></div>
         
 <p>
-          (Since the values are the locations of the Java installations on 
your local machine,
-          they are unlikely to change frequently and using the 
<tt>settings.xml</tt> file will be
-          the most convenient).
-        </p>
+          An alternative is to define the home directories as OS environment 
variables.
+          For example:
+          </p>
+<div class="source">
+<pre>
+          JAVA_1_8_HOME=$(/usr/libexec/java_home -v 1.8) # MacOS only
+          JAVA_1_8_HOME=/path/to/java8/home # Other Unix OSes
+          export JAVA_1_8_HOME
+          </pre></div>
+        
         
 <p>
-          Once you have configured those properties you can, for example, 
compile and test with Java 1.6 using the following command:
+          Once you have configured settings.xml or defined the OS variables 
you can, for example, compile and test with Java 1.6 using the following 
command:
         </p>
         
 <div class="source">
@@ -599,8 +605,9 @@
         </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)
+        You can also provide the appropriate property definition on the 
command-line.
+        (However for frequent use it is easier to update the settings file or 
ensure the OS defines the appropriate variables)
+        This overrides any property setting in the settings.xml file, which in 
turn overrides the OS environment variable.
         For example:
         </p>
         


Reply via email to