fixes issue 38631: Specify the HTML version to use when building the javadoc
authorCarlos Aristu <carlos.aristu@openbravo.com>
Fri, 25 May 2018 12:59:25 +0200
changeset 34282 49df7805985a
parent 34281 d13caf113d0e
child 34283 e0c799c4d5ba
fixes issue 38631: Specify the HTML version to use when building the javadoc

Starting from JDK9 it is possible to specify the HTML version to use when building the javadoc. In JDK10, if the format is not specified a warning is displayed.

Setting HTML5 as the default format starting from JDK9.
build.xml
--- a/build.xml	Thu May 24 18:01:58 2018 +0200
+++ b/build.xml	Fri May 25 12:59:25 2018 +0200
@@ -102,6 +102,15 @@
     <equals arg1="${ant.java.version}" arg2="1.7"/>
   </condition>
 
+  <condition property="html.version" value="-html5" else="">
+    <not>
+      <or>
+        <equals arg1="${ant.java.version}" arg2="1.7"/>
+        <equals arg1="${ant.java.version}" arg2="1.8"/>
+      </or>
+    </not>
+  </condition>
+
   <condition property="calculate.core.rev">
    <istrue value="${calculate.core.revision}"/>
   </condition>
@@ -540,7 +549,7 @@
   </target>
 
   <target name="generate.java.doc">
-    <javadoc Windowtitle="${title}" access="protected" Header="${header}" Footer="${footer}" destdir="${build.docs}" maxmemory="1024M" failonerror="yes" additionalparam="${xdoclint.missing}">
+    <javadoc Windowtitle="${title}" access="protected" Header="${header}" Footer="${footer}" destdir="${build.docs}" maxmemory="1024M" failonerror="yes" additionalparam="${xdoclint.missing} ${html.version}">
       <sourcepath>
         <pathelement path="${base.src}" />
         <pathelement path="${base.src.test}/src" />