<project name="www.itmill.com" basedir="../" default="site">
- <target name="site" depends="clean-all, manual-html" />
+ <target name="site" depends="clean-all, manual-html, tutorial-html" />
<target name="init">
<property name="themes-jar-name" value="${product-file}-themes-${version}.jar" />
<property name="demo-war-name" value="${product-file}-demo-${version}.war" />
- <echo message="Prepared to build www.itmill.com html" />
+ <echo message="Prepared to build www.itmill.com html files" />
</target>
<target name="manual-html" depends="init">
+ <echo message="Building manual" />
<mkdir dir="build/result/www.itmill.com/manual" />
<delete file="build/docbook/conf/temp.xsl" />
<copy file="build/docbook/www.itmill.com/custom-www.itmill.com-docbook.xsl" tofile="build/docbook/conf/temp.xsl">
<mapper type="glob" from="*.html" to="*.jsp" />
</move>
<!-- make a zip file -->
- <zip destfile="build/result/www.itmill.com//itmill-toolkit-5-manual.zip" basedir="build/result/www.itmill.com/manual" />
+ <zip destfile="build/result/www.itmill.com/itmill-toolkit-5-manual.zip" basedir="build/result/www.itmill.com/manual" />
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Build Application Tutorial. -->
+ <!-- ================================================================== -->
+
+ <!-- Initialize properties especially for the Tutorial. -->
+ <target name="init-tutorial" depends="">
+ <!-- Sets the current date as the publication date of the Tutorial. -->
+ <tstamp>
+ <format property="tutorial.pubdate" pattern="yyyy-MM-dd"/>
+ </tstamp>
+
+ <mkdir dir="build/result/www.itmill.com/tutorial" />
+ </target>
+
+ <target name="tutorial-html" depends="init, init-tutorial">
+ <echo message="Building tutorial" />
+ <delete file="build/docbook/conf/temp-tutorial.xsl" />
+ <copy file="build/docbook/www.itmill.com/custom-www.itmill.com-docbook.xsl" tofile="build/docbook/conf/temp-tutorial.xsl">
+
+ <filterchain>
+ <replacetokens>
+ <token key="BODYHEADER" value="${www.manual.body.start1}${www.manual.docbook.head.title}${www.manual.body.start2}" />
+ <token key="BODYFOOTER" value="${www.manual.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="512m">
+ <arg value="-in" />
+ <arg value="doc/tutorial/tutorial.xml" />
+ <arg value="-xsl" />
+ <arg value="build/docbook/conf/temp-tutorial.xsl" />
+ <arg value="-out" />
+ <arg value="build/result/www.itmill.com/tutorial/index.html" />
+ <arg value="-param" />
+ <arg value="section.autolabel" />
+ <arg value="1" />
+ <arg value="-param" />
+ <arg value="section.label.includes.component.label" />
+ <arg value="1" />
+ <arg value="-param" />
+ <arg value="section.autolabel.max.depth" />
+ <arg value="2" />
+ <arg value="-param" />
+ <arg value="use.extensions" />
+ <arg value="1" />
+ <arg value="-param" />
+ <arg value="manual.pubdate" />
+ <arg value="${tutorial.pubdate}" />
+ <arg value="-param" />
+ <arg value="manual.version" />
+ <arg value="${version}" />
+ <classpath refid="docbook-xsl.classpath" />
+ </java>
+ <delete file="build/docbook/conf/temp-tutorial.xsl" />
+ <copy todir="build/result/www.itmill.com/tutorial/img">
+ <fileset dir="doc/tutorial/img">
+ <exclude name="**/.svn" />
+ </fileset>
+ </copy>
+ <!-- rename to JSP -->
+ <move todir="build/result/www.itmill.com/tutorial">
+ <fileset dir="build/result/www.itmill.com/tutorial">
+ <include name="*.html" />
+ </fileset>
+ <mapper type="glob" from="*.html" to="*.jsp" />
+ </move>
+ <!-- make a zip file -->
+ <zip destfile="build/result/www.itmill.com//itmill-toolkit-5-tutorial.zip" basedir="build/result/www.itmill.com/tutorial" />
</target>
<!-- Clean results - - - - - - - - - - - - - - - - - - - - - - - - - -->