Subversion Repositories XServices

Rev

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