]> source.dussan.org Git - vaadin-framework.git/commitdiff
build.xml makes now also manual
authorJani Laakso <jani.laakso@itmill.com>
Thu, 18 Oct 2007 11:13:15 +0000 (11:13 +0000)
committerJani Laakso <jani.laakso@itmill.com>
Thu, 18 Oct 2007 11:13:15 +0000 (11:13 +0000)
svn changeset:2546/svn branch:trunk

build/build.xml

index 8cf335e2d0b75ec33bb4aa2105c75016df5cab23..3bbf44cb345aeb9bebae01a08a92cfcfaa78eea2 100644 (file)
@@ -57,7 +57,6 @@
                <mkdir dir="${output-dir}/doc/manual" />
                <mkdir dir="${output-dir}/doc/api" />
                <mkdir dir="${output-dir}/lib" />
-               <mkdir dir="${output-dir}/demo" />
                <mkdir dir="${output-dir}/WebContent" />
                <mkdir dir="${output-dir}/WebContent/WEB-INF" />
                <mkdir dir="${output-dir}/WebContent/WEB-INF/classes" />
                </war>
        </target>
 
-       <!-- Documentation- - - - - - - - - - - - - - - - - - - - - - - - - -->
-       <target name="docs" depends="javadoc,package-docs">
+       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+  Documentation 
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+       <target name="docs" depends="javadoc,manual-pdf,manual-html,package-docs">
        </target>
 
+
+       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+  Documentation: Add documentation including style files
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
        <target name="package-docs" depends="init">
-               <copy todir="${output-dir}">
-                       <filterchain>
-                               <expandproperties />
-                               <replacetokens begintoken="&lt;" endtoken=">">
-                                       <token key="body" value="${html.body.tag}${html.body.start1}${product-name}${html.body.start2}" />
-                                       <token key="/body" value="${html.body.end}${html.body.endtag}" />
-                               </replacetokens>
-                       </filterchain>
-                       <fileset dir="">
-                               <exclude name="**/.svn" />
-                               <exclude name="ReleaseNotes.html" />
-                               <include name="*.html" />
-                               <include name="*.txt" />
-                       </fileset>
-               </copy>
-               <copy todir="${output-dir}">
-                       <fileset dir="">
-                               <filename name="*.pdf" />
-                       </fileset>
-               </copy>
-               <copy todir="${output-dir}">
-                       <fileset dir="">
-                               <filename name="ReleaseNotes.html" />
-                       </fileset>
-               </copy>
                <copy todir="${output-dir}/doc/manual/html-style">
                        <fileset dir="doc/manual/html-style">
                                <exclude name="**/.svn" />
                </copy>
        </target>
 
+
+       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+  Documentation: Add Javadoc to doc
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
        <target name="javadoc" depends="preprocess-src">
                <javadoc destdir="${output-dir}/doc/api" author="true" version="true" use="true" windowtitle="${product-name}" classpath="build/lib/servlet-api.jar">
                        <packageset dir="build/result/src">
                                <include name="${toolkit-package}/**" />
                                <exclude name="${toolkit-package}/demo/**" />
+                               <exclude name="${toolkit-package}/tests/**/*" />
                        </packageset>
                        <doctitle>${javadoc.doctitle}</doctitle>
                        <!-- <header><![CDATA[<script type="text/javascript" src=".html-style/style.js"></script>]]></header> -->
                </javadoc>
        </target>
 
+
+       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+  Documentation: Add book part 2 (TBD)   
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+       <target name="book-part2" depends="dbdoclet">
+               <!-- TODO Add XSLT to transform dbdoclet results to book part 2 -->
+       </target>
+
+
+       <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+  Documentation: Add manual
+   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+       <target name="dbdoclet" depends="preprocess-src">
+               <javadoc access="public" charset="UTF-8" docencoding="UTF-8" encoding="ISO-8859-15" failonerror="yes" classpath="build/lib/servlet-api.jar" maxmemory="512m" source="1.5">
+                       <packageset dir="build/result/src">
+                               <include name="${toolkit-package}/**" />
+                               <exclude name="${toolkit-package}/demo/**" />
+                               <exclude name="${toolkit-package}/tests/**/*" />
+                       </packageset>
+                       <doclet name="org.dbdoclet.doclet.docbook.DocBookDoclet" path="build/lib/jdk${java.specification.version}/dbdoclet.jar">
+                               <param name="-d" value="result/docbook" />
+                       </doclet>
+               </javadoc>
+       </target>
+
+       <target name="manual-pdf" depends="init">
+               <!-- TODO Include XEP-based FO building in future -->
+       </target>
+
+       <target name="manual-html" depends="init">
+               <delete file="build/docbook/conf/temp.xsl" />
+               <copy file="build/docbook/conf/custom-html-docbook.xsl" tofile="build/docbook/conf/temp.xsl">
+                       <filterchain>
+                               <replacetokens>
+                                       <token key="BODYHEADER" value="${html.body.start1}${docbook.head.title}${html.body.start2}" />
+                                       <token key="BODYFOOTER" value="${html.body.end}" />
+                               </replacetokens>
+                       </filterchain>
+               </copy>
+               <path id="docbook-xsl.classpath">
+                       <pathelement path="build/lib/fserializer.jar" />
+                       <pathelement path="build/lib/xalan.jar" />
+                       <pathelement path="build/lib/xercesImpl.jar" />
+                       <pathelement path="build/lib/xml-apis.jar" />
+               </path>
+               <java classname="org.apache.xalan.xslt.Process" failonerror="yes" fork="yes" maxmemory="1300m">
+                       <arg value="-in" />
+                       <arg value="doc/manual/book.xml" />
+                       <arg value="-xsl" />
+                       <arg value="build/docbook/conf/temp.xsl" />
+                       <arg value="-out" />
+                       <arg value="${output-dir}/doc/manual/index.html" />
+                       <arg value="-param" />
+                       <arg value="use.extensions" />
+                       <arg value="1" />
+                       <classpath refid="docbook-xsl.classpath" />
+               </java>
+               <delete file="build/docbook/conf/temp.xsl" />
+               <copy todir="${output-dir}/doc/manual/img">
+                       <fileset dir="doc/manual/img">
+                               <exclude name="**/.svn" />
+                       </fileset>
+               </copy>
+       </target>
+
+
        <!-- Clean results - - - - - - - - - - - - - - - - - - - - - - - - - -->
        <target name="clean-all" depends="">
                <delete includeemptydirs="true" defaultexcludes="false">