Added Apache FOP for PDF creation
git-svn-id: https://brutex.net/svn/xservices/trunk@173 e7e49efb-446e-492e-b9ec-fcafc1997a86xservices-jre6
parent
cbc83ad1f9
commit
992d8a1ea8
144
build.xml
144
build.xml
|
@ -1,12 +1,43 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<project default="create-doc" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
|
<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="current-loc" location="." />
|
||||||
<property name="workspace" location=".." />
|
<property name="workspace" location=".." />
|
||||||
<property name="htmldir" value="${current-loc}/doc/html" />
|
<property name="htmldir" value="${current-loc}/doc/html" />
|
||||||
<property name="docbookdir" value="C:\JAVA-DEV\docbook-xsl-ns-1.76.1\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="docbooksource" value="${current-loc}/doc" />
|
||||||
<property name="xalan" value="org.apache.xalan.processor.TransformerFactoryImpl" />
|
<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 -->
|
<!-- XSLT Chunking Properties -->
|
||||||
|
@ -27,26 +58,98 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="create-doc" depends="clean-doc, merge">
|
<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">
|
||||||
<xslt force="true" style="${docbookdir}/../toHTML.xsl" in="${docbooksource}/BruteXServices_User_Guide.dbk" out="${htmldir}/index.html">
|
|
||||||
<factory name="${xalan}" />
|
<factory name="${xalan}" />
|
||||||
<param name="base.dir" expression="${htmldir}/" />
|
<classpath refid="xslthl.path" />
|
||||||
<param name="use.id.as.filename" 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="html.stylesheet" expression="style.css" />
|
<param name="html.stylesheet" expression="style.css" />
|
||||||
</xslt>
|
</xslt>
|
||||||
<copy file="${docbooksource}/style.css" overwrite="true" tofile="${htmldir}/style.css" />
|
<copy file="${docbooksource}/style.css" overwrite="true" tofile="${htmldir}/style.css" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="create-webdoc" depends="clean-doc, merge">
|
<!--
|
||||||
|
- target: chunks-html
|
||||||
<xslt force="true" style="${docbookdir}/../fo/docbook.xsl" in="${docbooksource}/BruteXServices_User_Guide.dbk" out="${htmldir}/xservices.fo">
|
- 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}" />
|
<factory name="${xalan}" />
|
||||||
|
<classpath refid="xslthl.path" />
|
||||||
|
<include name="**/*.dbk" />
|
||||||
<param name="base.dir" expression="${htmldir}/" />
|
<param name="base.dir" expression="${htmldir}/" />
|
||||||
<param name="use.id.as.filename" expression="1" />
|
<param name="use.id.as.filename" expression="1" />
|
||||||
<param name="fop.extensions" expression="0" />
|
<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>
|
</xslt>
|
||||||
</target>
|
</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: resolve
|
||||||
================================= -->
|
================================= -->
|
||||||
|
@ -54,4 +157,27 @@
|
||||||
<ivy:retrieve />
|
<ivy:retrieve />
|
||||||
</target>
|
</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>
|
</project>
|
||||||
|
|
Loading…
Reference in New Issue