Subversion Repositories XServices

Rev

Rev 157 | Rev 182 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
62 brianR 1
<?xml version="1.0"?>
137 brianR 2
<project default="create-doc" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
62 brianR 3
 
173 brianR 4
	<!-- C:\JAVA-DEV\apache-fop-1.1 -->
5
 
6
	<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop">
7
		<classpath>
8
			<fileset dir="C:\\JAVA-DEV\\apache-fop-1.1">
9
				<include name="build/*.jar" />
10
				<include name="lib/*.jar" />
11
			</fileset>
12
		</classpath>
13
	</taskdef>
14
 
15
	<!-- External Syntax Higlighter for docbook xsl -->
16
	<path id="xslthl.path">
17
		<pathelement location="C:\\JAVA-DEV\\xslthl-2.1.0\\xslthl-2.1.0.jar" />
18
	</path>
19
 
20
 
62 brianR 21
	<property name="current-loc" location="." />
22
	<property name="workspace" location=".." />
23
	<property name="htmldir" value="${current-loc}/doc/html" />
173 brianR 24
	<property name="docbookdir" value="D:/DATA/JAVA-DEV/docbook-xsl-1.78.1/" />
25
 
26
	<property name="fo.stylesheet" value="${docbookdir}/fo/docbook.xsl" />
27
	<property name="fo.stylesheet.hl" value="${docbookdir}/fo/docbook.xsl" />
28
	<property name="html.stylesheet.hl" value="${docbookdir}/html/docbook-with-highlighting.xsl" />
29
	<property name="html.chunked.stylesheet.hl" value="${docbookdir}/html/docbook-chunked-with-highlighting.xsl" />
30
	<property name="eclipse.stylesheet" value="${docbookdir}/eclipse/eclipse.xsl" />
31
	<property name="html.stylesheet" value="${docbookdir}/html/docbook.xsl" />
32
	<property name="javahelp.stylesheet" value="${docbookdir}/javahelp/javahelp.xsl" />
33
	<property name="xhtml5.stylesheet" value="${docbookdir}/xhtml5/docbook.xsl" />
34
 
137 brianR 35
	<property name="docbooksource" value="${current-loc}/doc" />
62 brianR 36
	<property name="xalan" value="org.apache.xalan.processor.TransformerFactoryImpl" />
173 brianR 37
	<property name="web.dir" value="${current-loc}/web" />
38
	<property name="build.dir" value="${current-loc}/bin" />
39
	<property name="delivery.dir" value="c:\\TEMP\\_DELIVERY_AREA" />
40
	<property name="name" value="XServices" />
62 brianR 41
 
137 brianR 42
 
62 brianR 43
	<!-- XSLT Chunking Properties -->
137 brianR 44
	<property name="base.dir" value="${htmldir}" />
45
 
62 brianR 46
	<target name="merge">
144 brianR 47
		<!-- XInclude support comes with Eclipse XML Tools Project,
48
			the Ant target needs to be executed in the Eclispe Workspace JRE
49
			in order to get found. Any custom project specific runtime
50
			may not work.
51
		-->
137 brianR 52
		<xsl.xinclude in="${docbooksource}/BruteXServices_User_Guide.xml" out="${docbooksource}/BruteXServices_User_Guide.dbk" />
62 brianR 53
	</target>
137 brianR 54
 
62 brianR 55
	<target name="clean-doc">
56
		<delete dir="${htmldir}" />
137 brianR 57
		<mkdir dir="${htmldir}" />
62 brianR 58
	</target>
59
 
60
	<target name="create-doc" depends="clean-doc, merge">
173 brianR 61
		<xslt force="true" style="${html.stylesheet.hl}" in="${docbooksource}/BruteXServices_User_Guide.dbk" out="${htmldir}/index.html">
62 brianR 62
			<factory name="${xalan}" />
173 brianR 63
			<classpath refid="xslthl.path" />
64
			<param name="highlight.xslthl.config" expression="file:///C:/JAVA-DEV/docbook-xsl-1.78.1/highlighting/xslthl-config.xml" />
65
			<param name="highlight.source" expression="1" />
157 brianR 66
			<param name="html.stylesheet" expression="style.css" />
62 brianR 67
		</xslt>
173 brianR 68
		<copy file="${docbooksource}/style.css" overwrite="true" tofile="${htmldir}/style.css" />
62 brianR 69
	</target>
137 brianR 70
 
173 brianR 71
	<!--
72
	    - target: chunks-html
73
	    - description: Iterates through a directory and transforms
74
	    - .xml files into seperate .html files using the DocBook XSL.
75
	  -->
76
	<target name="build-chunks" depends="clean-doc, merge" description="chunk HTML from DocBook XML">
77
		<xslt style="${html.chunked.stylesheet.hl}" extension=".html" basedir="${docbooksource}" destdir="${htmldir}">
83 brianR 78
			<factory name="${xalan}" />
173 brianR 79
			<classpath refid="xslthl.path" />
80
			<include name="**/*.dbk" />
137 brianR 81
			<param name="base.dir" expression="${htmldir}/" />
83 brianR 82
			<param name="use.id.as.filename" expression="1" />
173 brianR 83
			<param name="html.stylesheet" expression="styles.css" />
84
			<param name="section.autolabel" expression="1" />
85
			<param name="html.cleanup" expression="1" />
86
			<param name="chunk.first.selection" expression="1" />
87
			<param name="navig.showtitles" expression="1" />
88
			<param name="highlight.xslthl.config" expression="file:///C:/JAVA-DEV/docbook-xsl-1.78.1/highlighting/xslthl-config.xml" />
89
			<param name="highlight.source" expression="1" />
83 brianR 90
		</xslt>
173 brianR 91
		<copy file="${docbooksource}/style.css" overwrite="true" tofile="${htmldir}/style.css" />
83 brianR 92
	</target>
93
 
173 brianR 94
 
95
	<target name="build-pdf" depends="merge" description="PDF from DocBook XML">
96
		<!-- Convert DocBook Files into FO -->
97
		<xslt style="${fo.stylesheet.hl}" extension=".fo" basedir="${docbooksource}" destdir="${htmldir}">
98
			<include name="BruteXServices_User_Guide.dbk" />
99
			<classpath refid="xslthl.path" />
100
			<param name="fop1.extensions" expression="1" />
101
			<param name="section.autolabel" expression="1" />
102
			<param name="chapter.autolabel" expression="1" />
103
			<param name="appendix.autolabel" expression="1" />
104
			<param name="section.label.includes.component.label" expression="1" />
105
			<param name="highlight.xslthl.config" expression="file:///C:/JAVA-DEV/docbook-xsl-1.78.1/highlighting/xslthl-config.xml" />
106
			<param name="highlight.source" expression="1" />
107
			<param name="paper.type" expression="A4" />
108
		</xslt>
109
 
110
		<!-- Convert FO Files into pdf -->
111
		<fop format="application/pdf" outdir="${htmldir}">
112
			<fileset dir="${htmldir}">
113
				<include name="**/*.fo" />
114
			</fileset>
115
		</fop>
116
	</target>
117
 
118
	<target name="build-html5" depends="clean-doc, merge" description="Generates HTML5 files">
119
 
120
		<xslt style="${xhtml5.stylesheet}" extension=".html" basedir="${docbooksource}" destdir="${htmldir}">
121
			<include name="**/*.dbk" />
122
			<param name="html.stylesheet" expression="style.css" />
123
			<param name="docbook.css.source" expression="" />
124
			<param name="section.autolabel" expression="1" />
125
			<param name="make.clean.html" expression="1" />
126
		</xslt>
127
	</target>
128
 
129
	<!--
130
	    - target: build-javahelp
131
	    - description: Iterates through a directory and transforms
132
	    - .xml files into .html files using the DocBook XSL.
133
	    -->
134
	<target name="build-javahelp" depends="clean-doc, merge" description="JavaHelp from DocBook XML">
135
		<xslt style="${javahelp.stylesheet}" extension=".html" basedir="${docbooksource}" destdir="${htmldir}">
136
			<include name="**/*.dbk" />
137
			<outputproperty name="indent" value="yes" />
138
		</xslt>
139
	</target>
140
 
141
 
142
	<target name="build-eclipse" depends="clean-doc, merge" description="Eclipse help from DocBook XML">
143
	    <xslt style="${eclipse.stylesheet}" basedir="${docbooksource}" destdir="${htmldir}">
144
	      <include name="**/*.dbk" />
145
	    </xslt>
146
	  </target>
147
 
148
 
149
 
150
 
151
 
152
 
137 brianR 153
	<!-- =================================
154
	          target: resolve
173 brianR 155
	     ================================= -->
137 brianR 156
	<target name="resolve" description="--> retrieve dependencies with ivy">
157
		<ivy:retrieve />
158
	</target>
159
 
173 brianR 160
	<target name="build-war">
161
		<ivy:retrieve pattern="c://TEMP/lib/default/[artifact]-[revision].[ext]" conf="default" />
162
		<war destfile="${delivery.dir}\\${name}.war" webxml="${web.dir}/WEB-INF/web.xml">
163
			<fileset dir="${web.dir}/">
164
				<include name="**/*.*" />
165
			</fileset>
166
			<lib dir="c://TEMP/lib/default">
167
				<!--<exclude name="portlet.jar"/>-->
168
			</lib>
169
			<classes dir="${build.dir}" />
170
		</war>
171
		<tstamp>
172
			<format property="build.version" pattern="yyyyMMddhhmmss" />
173
		</tstamp>
174
		<mkdir dir="${delivery.dir}\\${name}\\${name}-${build.version}" />
175
		<move file="${delivery.dir}\\${name}.war" toFile="${delivery.dir}\\${name}\\${name}-${build.version}\\${name}.war" />
176
		<copy todir="${delivery.dir}\\${name}\\${name}-${build.version}\\html">
177
			<fileset dir="${htmldir}">
178
			</fileset>
179
		</copy>
180
		<echo>Distribution: ${delivery.dir}\\${name}\\${name}-${build.version} </echo>
181
	</target>
182
 
62 brianR 183
</project>