Author: steveh
Date: Tue Dec 14 15:02:27 2004
New Revision: 111896

URL: http://svn.apache.org/viewcvs?view=rev&rev=111896
Log:
Fix for BEEHIVE-28: Clean up docs build

Note: with this checkin, the <netui> taglib doc build checks to see if the 
necessary resources are available (namely, the TLD files).  
If the TLD files are *not* present, then 'trunk/build.xml>ant deploy' is called 
before the taglib doc build is attempted.
If they *are* present, the taglib doc build is attempted immediately.
This also avoids the strange 'infinite loop' behavior that was observed when 
'trunk/build.xml> docs' was made to directly depend upon 'trunk/build.xml> 
deploy'.
Modified:
   incubator/beehive/trunk/netui/ant/javadoc.xml

Modified: incubator/beehive/trunk/netui/ant/javadoc.xml
Url: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/ant/javadoc.xml?view=diff&rev=111896&p1=incubator/beehive/trunk/netui/ant/javadoc.xml&r1=111895&p2=incubator/beehive/trunk/netui/ant/javadoc.xml&r2=111896
==============================================================================
--- incubator/beehive/trunk/netui/ant/javadoc.xml       (original)
+++ incubator/beehive/trunk/netui/ant/javadoc.xml       Tue Dec 14 15:02:27 2004
@@ -5,13 +5,15 @@
        <property environment="os"/>
 
        <property file="${os.BEEHIVE_HOME}/beehive.properties"/>
-        <property file="netui.properties"/>
+    <property file="netui.properties"/>
 
        <property name="docs.build.dir" value="${build.dir}/docs"/>
        <property name="docs.temp" value="${docs.build.dir}/temp"/>
        <property name="xalan.jar" location="${docs.dir}/external/xalan.jar"/>
        <property name="doclet.jar" 
location="${docs.dir}/tools/lib/jsptagrefdoclet_single.jar"/>
 
+       <available file="${build.lib.dir}/beehive-netui-tags-html.tld" 
property="tlds.present"/>
+
        <path id="javadoc.classpath">
                <fileset dir="${struts.dir}" includes="*.jar"/>
                <fileset dir="${xdoclet.dir}" includes="*.jar"/>
@@ -31,7 +33,7 @@
                <echo 
message="================================================================================"/>
                <echo message="|                                  Usage         
                              |"/>
                <echo 
message="================================================================================"/>
-               <echo message="build-docs - Cleans and builds all doc, copies 
the result to the forrest site.    "/>
+               <echo message="build - Cleans and builds all doc, copies the 
result to the forrest site.    "/>
                <echo message="clean - Deletes the built netui docs and 
associated temp files."/>
                <echo message="generate-class-ref - Generates the Page Flow 
class reference, using the standard Javadoc doclet."/>
                <echo message="generate-taglib-ref - Generates the netui Tag 
Library reference."/>
@@ -42,6 +44,7 @@
        </target>
        <!-- You must deploy netui before you run this target, or any of its 
sub-targets. -->
        <target name="build" description="Generates Javadoc for all core 
classes and tags, copies all docs to the build directory for distribution, also 
copies all docs to the forrest directory.">
+           <echo message="tlds.present: ${tlds.present}"/>
                <antcall target="clean"/>
                <antcall target="generate-class-ref"/>
                <antcall target="generate-taglib-ref"/>
@@ -89,7 +92,10 @@
                        <packageset dir="${src.dir}/util"/>
                </javadoc>
        </target>
-       <target name="generate-taglib-ref" description="Uses a custom doclet to 
generate HTML topics from Java source files.">
+       <target name="generate-taglib-ref" depends="check-for-tlds" 
+         description="Uses a custom doclet to generate HTML topics from Java 
source files.  
+         Checks for the presence of the TLD file beehive-netui-tags-html.tld 
first.
+         If it isn't present, Beehive 'deploy' is called.">
                <delete dir="${docs.temp}" failonerror="false"/>
                <delete dir="${build.dir}/docs/apidocs/taglib" 
failonerror="false"/>
                <mkdir dir="${build.dir}/docs/apidocs/taglib"/>
@@ -149,5 +155,8 @@
        </target>
        <target name="make-doclet-jar" description="Utiltiy function that 
re-JARs jsptagrefdoclet.jar.  Use this target if you make changes to the XSLT 
files, or other files, imbedded in jsptagrefdoclet.jar">
                <jar jarfile="${docs.dir}/tools/lib/jsptagrefdoclet.jar" 
basedir="${docs.dir}/tools/docletsrc"/>
+       </target>
+       <target name="check-for-tlds" unless="tlds.present">
+               <ant dir="../../" target="deploy"/>
        </target>
 </project>

Reply via email to