Subversion Repositories XServices

Rev

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