You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2013/12/03 12:42:00 UTC

svn commit: r1547347 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/common-build.xml

Author: uschindler
Date: Tue Dec  3 11:41:59 2013
New Revision: 1547347

URL: http://svn.apache.org/r1547347
Log:
Merged revision(s) 1547346 from lucene/dev/trunk:
LUCENE-5355: Add support for -Dbootjdk to point to a separate JAVA_HOME that is used to generate javadocs; validate the -Dbootclasspath to point to a valid rt.jar

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/common-build.xml   (contents, props changed)

Modified: lucene/dev/branches/branch_4x/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/common-build.xml?rev=1547347&r1=1547346&r2=1547347&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/common-build.xml (original)
+++ lucene/dev/branches/branch_4x/lucene/common-build.xml Tue Dec  3 11:41:59 2013
@@ -159,7 +159,6 @@
   <property name="javac.source.backwards" value="1.6"/>
   <property name="javac.target.backwards" value="1.6"/>
   <property name="javac.args" value="-Xlint -Xlint:-deprecation -Xlint:-serial -Xlint:-options"/>
-  <property name="bootclasspath" value=""/>
   <property name="javadoc.link" value="http://download.oracle.com/javase/6/docs/api/"/>
   <property name="javadoc.link.junit" value="http://junit.sourceforge.net/javadoc/"/>
   <property name="javadoc.packagelist.dir" location="${common.dir}/tools/javadoc"/>
@@ -169,6 +168,35 @@
   <property name="javadoc.dir" location="${common.dir}/build/docs"/>
   <property name="javadoc.maxmemory" value="512m" />
   <property name="javadoc.noindex" value="true"/>
+
+  <!-- detect bootclasspath from given bootjdk path (including crazy AppleJDK special case) -->
+  <first id="-boot-rt.jar">
+    <fileset dir="${bootjdk}" erroronmissingdir="false" followsymlinks="true">
+      <include name="jre/lib/rt.jar" /><!-- Oracle JDK -->
+      <include name="lib/rt.jar" /><!-- Oracle JRE -->
+      <include name="bundle/Classes/classes.jar" /><!-- Apple JDK -->
+    </fileset>
+  </first>
+  <property name="bootclasspath" value="${toString:-boot-rt.jar}" />
+  <fail message="Invalid 'bootjdk' parameter, because it contains no class library JAR: ${bootjdk}">
+    <condition>
+      <and>
+        <isset property="bootjdk" />
+        <equals arg1="${bootclasspath}" arg2=""/>
+      </and>
+    </condition>
+  </fail>
+  <fail message="Invalid 'bootclasspath' parameter, because it does not point to a valid class library JAR: ${bootclasspath}">
+    <condition>
+      <not>
+        <or>
+          <equals arg1="${bootclasspath}" arg2=""/>
+          <available classname="java.lang.StringBuilder" classpath="${bootclasspath}" ignoresystemclasses="true"/>
+        </or>
+      </not>
+    </condition>
+  </fail>
+
   <!-- Javadoc classpath -->
   <path id="javadoc.classpath">
     <path refid="classpath"/>