XServices/build.xml

184 lines
7.5 KiB
XML

<?xml version="1.0"?>
<project default="create-doc" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- C:\JAVA-DEV\apache-fop-1.1 -->
<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop">
<classpath>
<fileset dir="C:\\JAVA-DEV\\apache-fop-1.1">
<include name="build/*.jar" />
<include name="lib/*.jar" />
</fileset>
</classpath>
</taskdef>
<!-- External Syntax Higlighter for docbook xsl -->
<path id="xslthl.path">
<pathelement location="C:\\JAVA-DEV\\xslthl-2.1.0\\xslthl-2.1.0.jar" />
</path>
<property name="current-loc" location="." />
<property name="workspace" location=".." />
<property name="htmldir" value="${current-loc}/doc/html" />
<property name="docbookdir" value="D:/DATA/JAVA-DEV/docbook-xsl-1.78.1/" />
<property name="fo.stylesheet" value="${docbookdir}/fo/docbook.xsl" />
<property name="fo.stylesheet.hl" value="${docbookdir}/fo/docbook.xsl" />
<property name="html.stylesheet.hl" value="${docbookdir}/html/docbook-with-highlighting.xsl" />
<property name="html.chunked.stylesheet.hl" value="${docbookdir}/html/docbook-chunked-with-highlighting.xsl" />
<property name="eclipse.stylesheet" value="${docbookdir}/eclipse/eclipse.xsl" />
<property name="html.stylesheet" value="${docbookdir}/html/docbook.xsl" />
<property name="javahelp.stylesheet" value="${docbookdir}/javahelp/javahelp.xsl" />
<property name="xhtml5.stylesheet" value="${docbookdir}/xhtml5/docbook.xsl" />
<property name="docbooksource" value="${current-loc}/doc" />
<property name="xalan" value="org.apache.xalan.processor.TransformerFactoryImpl" />
<property name="web.dir" value="${current-loc}/web" />
<property name="build.dir" value="${current-loc}/bin" />
<property name="delivery.dir" value="c:\\TEMP\\_DELIVERY_AREA" />
<property name="name" value="XServices" />
<!-- XSLT Chunking Properties -->
<property name="base.dir" value="${htmldir}" />
<target name="merge">
<!-- XInclude support comes with Eclipse XML Tools Project,
the Ant target needs to be executed in the Eclispe Workspace JRE
in order to get found. Any custom project specific runtime
may not work.
-->
<xsl.xinclude in="${docbooksource}/BruteXServices_User_Guide.xml" out="${docbooksource}/BruteXServices_User_Guide.dbk" />
</target>
<target name="clean-doc">
<delete dir="${htmldir}" />
<mkdir dir="${htmldir}" />
</target>
<target name="create-doc" depends="clean-doc, merge">
<xslt force="true" style="${html.stylesheet.hl}" in="${docbooksource}/BruteXServices_User_Guide.dbk" out="${htmldir}/index.html">
<factory name="${xalan}" />
<classpath refid="xslthl.path" />
<param name="highlight.xslthl.config" expression="file:///C:/JAVA-DEV/docbook-xsl-1.78.1/highlighting/xslthl-config.xml" />
<param name="highlight.source" expression="1" />
<param name="html.stylesheet" expression="style.css" />
</xslt>
<copy file="${docbooksource}/style.css" overwrite="true" tofile="${htmldir}/style.css" />
</target>
<!--
- target: chunks-html
- description: Iterates through a directory and transforms
- .xml files into seperate .html files using the DocBook XSL.
-->
<target name="build-chunks" depends="clean-doc, merge" description="chunk HTML from DocBook XML">
<xslt style="${html.chunked.stylesheet.hl}" extension=".html" basedir="${docbooksource}" destdir="${htmldir}">
<factory name="${xalan}" />
<classpath refid="xslthl.path" />
<include name="**/*.dbk" />
<param name="base.dir" expression="${htmldir}/" />
<param name="use.id.as.filename" expression="1" />
<param name="html.stylesheet" expression="styles.css" />
<param name="section.autolabel" expression="1" />
<param name="html.cleanup" expression="1" />
<param name="chunk.first.selection" expression="1" />
<param name="navig.showtitles" expression="1" />
<param name="highlight.xslthl.config" expression="file:///C:/JAVA-DEV/docbook-xsl-1.78.1/highlighting/xslthl-config.xml" />
<param name="highlight.source" expression="1" />
</xslt>
<copy file="${docbooksource}/style.css" overwrite="true" tofile="${htmldir}/style.css" />
</target>
<target name="build-pdf" depends="merge" description="PDF from DocBook XML">
<!-- Convert DocBook Files into FO -->
<xslt style="${fo.stylesheet.hl}" extension=".fo" basedir="${docbooksource}" destdir="${htmldir}">
<include name="BruteXServices_User_Guide.dbk" />
<classpath refid="xslthl.path" />
<param name="fop1.extensions" expression="1" />
<param name="section.autolabel" expression="1" />
<param name="chapter.autolabel" expression="1" />
<param name="appendix.autolabel" expression="1" />
<param name="section.label.includes.component.label" expression="1" />
<param name="highlight.xslthl.config" expression="file:///C:/JAVA-DEV/docbook-xsl-1.78.1/highlighting/xslthl-config.xml" />
<param name="highlight.source" expression="1" />
<param name="paper.type" expression="A4" />
</xslt>
<!-- Convert FO Files into pdf -->
<fop format="application/pdf" outdir="${htmldir}">
<fileset dir="${htmldir}">
<include name="**/*.fo" />
</fileset>
</fop>
</target>
<target name="build-html5" depends="clean-doc, merge" description="Generates HTML5 files">
<xslt style="${xhtml5.stylesheet}" extension=".html" basedir="${docbooksource}" destdir="${htmldir}">
<include name="**/*.dbk" />
<param name="html.stylesheet" expression="style.css" />
<param name="docbook.css.source" expression="" />
<param name="section.autolabel" expression="1" />
<param name="make.clean.html" expression="1" />
</xslt>
</target>
<!--
- target: build-javahelp
- description: Iterates through a directory and transforms
- .xml files into .html files using the DocBook XSL.
-->
<target name="build-javahelp" depends="clean-doc, merge" description="JavaHelp from DocBook XML">
<xslt style="${javahelp.stylesheet}" extension=".html" basedir="${docbooksource}" destdir="${htmldir}">
<include name="**/*.dbk" />
<outputproperty name="indent" value="yes" />
</xslt>
</target>
<target name="build-eclipse" depends="clean-doc, merge" description="Eclipse help from DocBook XML">
<xslt style="${eclipse.stylesheet}" basedir="${docbooksource}" destdir="${htmldir}">
<include name="**/*.dbk" />
</xslt>
</target>
<!-- =================================
target: resolve
================================= -->
<target name="resolve" description="--> retrieve dependencies with ivy">
<ivy:retrieve />
</target>
<target name="build-war">
<ivy:retrieve pattern="c://TEMP/lib/default/[artifact]-[revision].[ext]" conf="default" />
<war destfile="${delivery.dir}\\${name}.war" webxml="${web.dir}/WEB-INF/web.xml">
<fileset dir="${web.dir}/">
<include name="**/*.*" />
</fileset>
<lib dir="c://TEMP/lib/default">
<!--<exclude name="portlet.jar"/>-->
</lib>
<classes dir="${build.dir}" />
</war>
<tstamp>
<format property="build.version" pattern="yyyyMMddhhmmss" />
</tstamp>
<mkdir dir="${delivery.dir}\\${name}\\${name}-${build.version}" />
<move file="${delivery.dir}\\${name}.war" toFile="${delivery.dir}\\${name}\\${name}-${build.version}\\${name}.war" />
<copy todir="${delivery.dir}\\${name}\\${name}-${build.version}\\html">
<fileset dir="${htmldir}">
</fileset>
</copy>
<echo>Distribution: ${delivery.dir}\\${name}\\${name}-${build.version} </echo>
</target>
</project>