You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2006/04/14 16:28:18 UTC

svn commit: r394110 - in /db/derby/code/trunk: build.xml tools/javadoc/derbydocs_exclusions.ant tools/javadoc/derbydocs_jdbc4_exclusions.ant tools/javadoc/publishedapi.ant tools/javadoc/publishedapi_jdbc4.ant

Author: rhillegas
Date: Fri Apr 14 07:28:16 2006
New Revision: 394110

URL: http://svn.apache.org/viewcvs?rev=394110&view=rev
Log:
Commit bug1079_rev1.diff for DERBY-1079: Use jdk16 javadoc tool if ant.properties points at a jdk16 installation.

Added:
    db/derby/code/trunk/tools/javadoc/derbydocs_jdbc4_exclusions.ant   (with props)
    db/derby/code/trunk/tools/javadoc/publishedapi_jdbc4.ant   (with props)
Modified:
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/tools/javadoc/derbydocs_exclusions.ant
    db/derby/code/trunk/tools/javadoc/publishedapi.ant

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/build.xml?rev=394110&r1=394109&r2=394110&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Fri Apr 14 07:28:16 2006
@@ -19,6 +19,10 @@
   <!-- Release and version info -->
   <property file="${properties.dir}/release.properties"/>
 
+  <property name="javadoc.temp.dir" value="${out.javadoc.dir}/temp"/>
+  <property name="javadoc.exclusions" value="${javadoc.temp.dir}/javadoc_exclusions"/>
+  <property name="javadoc.inclusions" value="${javadoc.temp.dir}/javadoc_inclusions"/>
+
 <!-- Targets -->
 
   <target name="buildsource" depends="init,engine,tools,drda,client,build,versioninfo,localeinfo"/>
@@ -535,9 +539,24 @@
 <!--                           Javadoc targets                           -->
 <!-- =================================================================== -->
 
-  <target name="javadoc" depends="init,initjars,publishedapi,derbydocs,toolsdocs,grammardocs"/>
+  <target name="dummy">
+    <echo message="java.home = ${java.home}"/>
+  </target>
+
+  <target name="javadoc"
+    depends="init-javadoc-tool,init,initjars,publishedapi,derbydocs,toolsdocs,grammardocs"/>
+
+  <target name="init-javadoc-tool" depends="init-javadoc-not-jdk16,init-javadoc-jdk16"/>
+
+  <target name="init-javadoc-not-jdk16" unless="jdk16">
+    <property name="javadoc.tool" value="${java.home}/../bin/javadoc"/>
+  </target>
+
+  <target name="init-javadoc-jdk16" if="jdk16">
+    <property name="javadoc.tool" value="${jdk16}/bin/javadoc"/>
+  </target>
 
-  <target name="publishedapi" depends="initjars">
+  <target name="publishedapi" depends="init-javadoc-tool,initjars">
  
     <tstamp>
       <format 
@@ -552,7 +571,15 @@
     <delete dir="${out.javadoc.dir}/publishedapi"/>
     <mkdir dir="${out.javadoc.dir}/publishedapi"/>
 
+    <!--  Only include the files we want customers to see.  -->
+    <mkdir dir="${javadoc.temp.dir}"/>
+    <antcall target="include-in-javadoc">
+      <param name="more_inclusions" value="publishedapi.ant"/>
+    </antcall>
+    <antcall target="publishedapi-jdk16-includes"/>
+
     <javadoc sourcepath="${out.javadoc.dir}/sourcedir"
+             executable="${javadoc.tool}"
              classpath="${compile.classpath};${osgi};${servlet24};${out.dir}"
              breakiterator="true"
              destdir="${out.javadoc.dir}/publishedapi"
@@ -562,20 +589,21 @@
              Footer="${javadoc.Footer}"
              bottom="Apache Derby ${major}.${minor} API Documentation  -  &lt;i&gt;Copyright &amp;copy; 1997,2006 The Apache Software Foundation or its licensors, as applicable.&lt;/i&gt;">
       <fileset dir="${derby.engine.src.dir}"
-               includesfile="${javadoctools.dir}/publishedapi.ant"/>
+               includesfile="${javadoc.inclusions}"/>
       <fileset dir="${derby.client.src.dir}"
-               includesfile="${javadoctools.dir}/publishedapi.ant"/>
+               includesfile="${javadoc.inclusions}"/>
       <fileset dir="${derby.drda.src.dir}"
-               includesfile="${javadoctools.dir}/publishedapi.ant"/>
+               includesfile="${javadoc.inclusions}"/>
       <fileset dir="${derby.tools.src.dir}"
-               includesfile="${javadoctools.dir}/publishedapi.ant"/>
+               includesfile="${javadoc.inclusions}"/>
     </javadoc>
 
     <delete dir="${out.javadoc.dir}/sourcedir"/>
+    <delete dir="${javadoc.temp.dir}"/>
 
   </target>
 
-  <target name="derbydocs" depends="initjars">
+  <target name="derbydocs" depends="init-javadoc-tool,initjars">
 
     <delete dir="${out.javadoc.dir}/engine"/>
     <mkdir dir="${out.javadoc.dir}/engine"/>
@@ -586,7 +614,15 @@
     <copy file="${javadoctools.dir}/package-list" 
           todir="${out.javadoc.dir}/engine"/>
 
+    <!--  Build scripts and other cruft choke javadoc. Exclude these files.  -->
+    <mkdir dir="${javadoc.temp.dir}"/>
+    <antcall target="exclude-from-javadoc">
+      <param name="more_exclusions" value="derbydocs_exclusions.ant"/>
+    </antcall>
+    <antcall target="derbydocs-not-jdk16-excludes"/>
+
     <javadoc
+        executable="${javadoc.tool}"
         additionalparam="-J-mx320M"
         packagenames="org.*"
         access="private"
@@ -610,18 +646,77 @@
         <taglet name="org.apache.derbyBuild.javadoc.EndFormatTaglet" 
                 path="${basedir}/classes"/>
       <fileset dir="${derby.engine.src.dir}"
-               excludesfile="${javadoctools.dir}/derbydocs_exclusions.ant"/>
+               excludesfile="${javadoc.exclusions}"/>
       <fileset dir="${derby.client.src.dir}"
-               excludesfile="${javadoctools.dir}/derbydocs_exclusions.ant"/>
+               excludesfile="${javadoc.exclusions}"/>
       <fileset dir="${derby.drda.src.dir}"
-               excludesfile="${javadoctools.dir}/derbydocs_exclusions.ant"/>
+               excludesfile="${javadoc.exclusions}"/>
       <fileset dir="${derby.shared.src.dir}"
-               excludesfile="${javadoctools.dir}/derbydocs_exclusions.ant"/>
+               excludesfile="${javadoc.exclusions}"/>
       <fileset dir="${derby.tools.src.dir}"
-               excludesfile="${javadoctools.dir}/derbydocs_exclusions.ant"/> 
+               excludesfile="${javadoc.exclusions}"/> 
       <link href="."/>
     </javadoc>
 
+    <delete dir="${javadoc.temp.dir}"/>
+
+  </target>
+
+  <!--
+     Optionally include extra JDBC4 support in public API.
+  -->
+  <target name="publishedapi-jdk16-includes" if="jdk16">
+
+    <!--  Include extra JDBC4 support.  -->
+    <antcall target="include-in-javadoc">
+      <param name="more_inclusions" value="publishedapi_jdbc4.ant"/>
+    </antcall>
+
+  </target>
+
+  <!--
+     Include more files in the javadoc. Successive calls to this
+     target append more inclusions to the master file that tells
+	 javadoc which files to notice.
+
+	 Parameters:
+
+	     more_inclusions    Additional file to append to master inclusions file.
+  -->
+  <target name="include-in-javadoc">
+    <concat destfile="${javadoc.inclusions}" append="yes">
+       <filelist dir="${javadoctools.dir}" 
+         files="${more_inclusions}"
+       />
+    </concat>
+  </target>
+
+  <!--
+     Optionally exclude the JDBC4 classes, which choke the jdk14 javadoc tool.
+  -->
+  <target name="derbydocs-not-jdk16-excludes" unless="jdk16">
+
+    <antcall target="exclude-from-javadoc">
+      <param name="more_exclusions" value="derbydocs_jdbc4_exclusions.ant"/>
+    </antcall>
+
+  </target>
+
+  <!--
+     Exclude more files from the javadoc. Successive calls to this
+     target append more exclusions to the master file that tells
+	 javadoc which files to ignore.
+
+	 Parameters:
+
+	     more_exclusions    Additional file to append to master exclusions file.
+  -->
+  <target name="exclude-from-javadoc">
+    <concat destfile="${javadoc.exclusions}" append="yes">
+       <filelist dir="${javadoctools.dir}" 
+         files="${more_exclusions}"
+       />
+    </concat>
   </target>
 
   <target name="toolsdocs">

Modified: db/derby/code/trunk/tools/javadoc/derbydocs_exclusions.ant
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/tools/javadoc/derbydocs_exclusions.ant?rev=394110&r1=394109&r2=394110&view=diff
==============================================================================
--- db/derby/code/trunk/tools/javadoc/derbydocs_exclusions.ant (original)
+++ db/derby/code/trunk/tools/javadoc/derbydocs_exclusions.ant Fri Apr 14 07:28:16 2006
@@ -13,14 +13,6 @@
 # Please do not add whitespace in front of class names.
 # Blank lines and comments are allowed.
 
-org/apache/derby/jdbc/*40.java
-org/apache/derby/client/net/*40.java
-org/apache/derby/iapi/jdbc/*40.java
-org/apache/derby/impl/jdbc/*40.java
-org/apache/derby/impl/jdbc/EmbedRowId.java
-org/apache/derby/client/*40.java
-org/apache/derby/client/am/*40.java
-org/apache/derby/client/am/RowId.java
 **/build.xml
 **/*.properties
 **/*.jj

Added: db/derby/code/trunk/tools/javadoc/derbydocs_jdbc4_exclusions.ant
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/tools/javadoc/derbydocs_jdbc4_exclusions.ant?rev=394110&view=auto
==============================================================================
--- db/derby/code/trunk/tools/javadoc/derbydocs_jdbc4_exclusions.ant (added)
+++ db/derby/code/trunk/tools/javadoc/derbydocs_jdbc4_exclusions.ant Fri Apr 14 07:28:16 2006
@@ -0,0 +1,17 @@
+# for new packages.
+#
+# IMPORTANT: if you are adding a new package, be sure to add it to
+#            the list of packages in the publishedapi target in
+#            the toplevel build.xml file.
+#
+# Please do not add whitespace in front of class names.
+# Blank lines and comments are allowed.
+#
+# The classes in this file are the JDBC4 support which choke
+# the 1.4 javadoc tool. These classes are excluded if we
+# are not building the JDBC4 support.
+#
+
+**/*40.java
+org/apache/derby/impl/jdbc/EmbedRowId.java
+org/apache/derby/client/am/RowId.java

Propchange: db/derby/code/trunk/tools/javadoc/derbydocs_jdbc4_exclusions.ant
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/tools/javadoc/publishedapi.ant
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/tools/javadoc/publishedapi.ant?rev=394110&r1=394109&r2=394110&view=diff
==============================================================================
--- db/derby/code/trunk/tools/javadoc/publishedapi.ant (original)
+++ db/derby/code/trunk/tools/javadoc/publishedapi.ant Fri Apr 14 07:28:16 2006
@@ -1,4 +1,6 @@
-# This file contains a list of the files that constitute the public API
+# This file contains a list of the files that constitute the public
+# API. This includes the whole public API for Derby's JDBC3
+# implementation.
 # 
 # IMPORTANT: all names should be like package names, but with slashes
 #            instead of dots.

Added: db/derby/code/trunk/tools/javadoc/publishedapi_jdbc4.ant
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/tools/javadoc/publishedapi_jdbc4.ant?rev=394110&view=auto
==============================================================================
--- db/derby/code/trunk/tools/javadoc/publishedapi_jdbc4.ant (added)
+++ db/derby/code/trunk/tools/javadoc/publishedapi_jdbc4.ant Fri Apr 14 07:28:16 2006
@@ -0,0 +1,24 @@
+# This file contains the additional files that constitute the public
+# JDBC4 API. This list supplements the JDBC3 list found in
+# publishedapi.ant.
+# 
+# IMPORTANT: all names should be like package names, but with slashes
+#            instead of dots.
+#
+# Add new files to the appropriate package section; add new sections
+# for new packages.
+#
+# IMPORTANT: if you are adding a new package, be sure to add it to
+#            the list of packages in the publishedapi target in
+#            the toplevel build.xml file.
+#
+# Please do not add whitespace in front of class names.
+# Blank lines and comments are allowed.
+
+# package: org.apache.derby.jdbc
+
+org/apache/derby/jdbc/ClientDataSource40.java
+org/apache/derby/jdbc/EmbeddedConnectionPoolDataSource40.java
+org/apache/derby/jdbc/EmbeddedDataSource40.java
+org/apache/derby/jdbc/EmbeddedXADataSource40.java
+

Propchange: db/derby/code/trunk/tools/javadoc/publishedapi_jdbc4.ant
------------------------------------------------------------------------------
    svn:eol-style = native