Subversion Repositories XServices

Rev

Rev 173 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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