Subversion Repositories XServices

Rev

Rev 182 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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