-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.xml
More file actions
293 lines (237 loc) · 11.1 KB
/
build.xml
File metadata and controls
293 lines (237 loc) · 11.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<?xml version="1.0"?>
<!--
This file is part of the Echo Point Project. This project is a collection
of Components that have extended the Echo Web Application Framework.
EchoPoint is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
EchoPoint is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Echo Point; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-->
<project name="EchoPointNG" default="default" basedir=".">
<property name="version" value="2.x-SNAPSHOT"/>
<property name="debug" value="yes"/>
<!-- Directories -->
<property name="lib_dir" value="lib"/>
<property name="dist_dir" value="dist"/>
<property name="build_dir" value="build"/>
<property name="javadoc_dir" value="build/javadoc"/>
<!-- Project Directories -->
<property name="src.jar" value="projects/jar/src"/>
<property name="dest.jar" value="projects/jar/bin"/>
<property name="src.test" value="projects/test/src"/>
<property name="dest.test" value="projects/test/WEB-INF"/>
<!-- Licence File -->
<property name="licence_doc" value="${src.jar}/licence/COPYING"/>
<!-- Extra Properties -->
<property file="build.properties"/>
<patternset id="properties_files">
<include name="**/*.properties"/>
</patternset>
<patternset id="static_files">
<include name="**/*gif"/>
<include name="**/*jpg"/>
<include name="**/*png"/>
<include name="**/*js"/>
<include name="**/*swf"/>
<include name="**/*wav"/>
<include name="**/*thtml"/>
<include name="**/*xhtml"/>
<include name="**/*css"/>
<include name="**/*bnf"/>
<include name="**/*html"/>
<include name="**/*jsp"/>
<include name="**/*tld"/>
<include name="**/*xml"/>
<include name="**/*properties"/>
</patternset>
<patternset id="lib_files">
<include name="*.lib"/>
</patternset>
<path id="library_class_path">
<pathelement location="projects/jar/bin"/>
<pathelement location="${javax_servlet_jar}"/>
<pathelement location="${javax_jsp_jar}"/>
<pathelement location="${echo_app_jar}"/>
<pathelement location="${echo_webcontainer_jar}"/>
<pathelement location="${echo_webrender_jar}"/>
<pathelement location="${junit_jar}"/>
</path>
<!-- ************************************************************************************************** -->
<target name="start">
<echo>
Building EchoPointNG
Version : ${version}
Tomcat : ${TOMCAT_HOME}
Libraries Used
Echo App : ${echo_app_jar}
Echo Container : ${echo_webcontainer_jar}
Echo Render : ${echo_webcontainer_jar}
</echo>
</target>
<!-- ************************************************************************************************** -->
<!-- Initialization Tasks -->
<target name="init">
<tstamp/>
</target>
<!-- ************************************************************************************************** -->
<!-- Clean -->
<target name="clean"
description="Clears all generated files, including build directories, distributables, and documentation">
<delete dir="${build_dir}"/>
<delete dir="${dist_dir}"/>
<delete dir="${javadoc_dir}"/>
<delete dir="projects/jar/bin"/>
<delete dir="projects/test/WEB-INF"/>
<mkdir dir="${build_dir}"/>
<mkdir dir="${build_dir}/binary"/>
<mkdir dir="${build_dir}/binary/jar"/>
<mkdir dir="${build_dir}/binary/war"/>
</target>
<!-- ************************************************************************************************** -->
<!-- Compiles all the other compilation tasks -->
<target name="compile" depends="compileJar, compileTest"
description="Compiles all the other compilation tasks">
</target>
<!-- ************************************************************************************************** -->
<!-- Compile EchoPointNG library classes -->
<target name="compileJar" description="Compile EchoPointNG main classes.">
<delete dir="${dest.jar}"/>
<mkdir dir="${dest.jar}"/>
<javac srcdir="${src.jar}" destdir="${dest.jar}" debug="${debug}" source="1.4" target="1.4" deprecation="yes">
<classpath refid="library_class_path"/>
</javac>
<!-- Copy static content such as property files and graphic resources. -->
<copy todir="${dest.jar}">
<fileset dir="${src.jar}/ui/java"><patternset refid="properties_files"/></fileset>
<fileset dir="${src.jar}/ui/java"><patternset refid="static_files"/></fileset>
<fileset dir="${src.jar}/app/java"><patternset refid="static_files"/></fileset>
</copy>
<mkdir dir="${build_dir}" />
<mkdir dir="${build_dir}/binary" />
<mkdir dir="${build_dir}/binary/jar" />
<mkdir dir="${build_dir}/binary/war" />
<!-- and jar up the classes -->
<jar jarfile="${build_dir}/binary/jar/echopointng-${version}.jar" basedir="${dest.jar}"/>
</target>
<!-- ************************************************************************************************** -->
<!-- Compile EchoPointNG Test classes -->
<target name="compileTest" depends="compileJar" description="Compile the EchoPointNG Test classes.">
<delete dir="${dest.test}/classes"/>
<delete dir="${dest.test}/lib"/>
<mkdir dir="${dest.test}/classes"/>
<mkdir dir="${dest.test}/lib"/>
<copy todir="${dest.test}/lib">
<fileset dir="${lib_dir}">
</fileset>
</copy>
<copy file="${build_dir}/binary/jar/echopointng-${version}.jar" todir="${dest.test}/lib" />
<javac srcdir="${src.test}" destdir="${dest.test}/classes" debug="${debug}" source="1.4" target="1.4" deprecation="yes">
<classpath refid="library_class_path"/>
</javac>
<!-- copy property files into build dir -->
<copy todir="${dest.test}/classes/echopointng/test">
<fileset dir="${src.test}/echopointng/test">
<patternset refid="static_files"/>
</fileset>
</copy>
<!-- make a WAR file -->
<jar jarfile="${build_dir}/binary/war/echopointngtest.war" basedir="projects\test" update="no"
excludes="src/**,.**">
</jar>
</target>
<!-- ************************************************************************************************** -->
<!-- Deploys the WAR files to Tomcat -->
<target name="tomcatDeploy" description="Deploys the WAR files to Tomcat" if="TOMCAT_HOME" >
<echo>
Deploying WAR files to : ${TOMCAT_HOME}
</echo>
<delete dir="${TOMCAT_HOME}/webapps/echopointngtest" />
<copy file="${build_dir}/binary/war/echopointngtest.war" todir="${TOMCAT_HOME}/webapps" />
</target>
<!-- ************************************************************************************************** -->
<target name="deploy" depends="compile, tomcatDeploy" description="Deploys the created files to tomcat as specified in build.properties."></target>
<!-- ************************************************************************************************** -->
<!-- Create full API documentation -->
<target name="javadoc" description="Creates full JavaDoc documentation for the EchoPointNG API">
<delete dir="${javadoc_dir}"/>
<mkdir dir="${javadoc_dir}/docs"/>
<!-- Overview="${src.jar}/overview.html" -->
<javadoc source="1.4" sourcepath="${src.jar}/app/java" packagenames="echopointng.*"
destdir="${javadoc_dir}/docs"
additionalparam="-breakiterator"
WindowTitle="EchoPointNG API Specification"
DocTitle="EchoPointNG<br>API Specification"
Header="<b>EchoPoint<br>${version}</b>">
<classpath refid="library_class_path"/>
</javadoc>
</target>
<!-- ************************************************************************************************** -->
<!-- Create a source release. -->
<target name="releaseSrc" depends="init" description="Create a source release.">
<mkdir dir="${build_dir}/source"/>
<copy file="${licence_doc}" todir="${build_dir}/source"/>
<copy todir="${build_dir}/source">
<fileset dir="projects" defaultexcludes="yes">
<exclude name="**/*.nbattrs"/>
<exclude name="**/*.jar"/>
<exclude name="**/*.class"/>
<exclude name="**/classes/*"/>
</fileset>
</copy>
<mkdir dir="${dist_dir}"/>
<!-- Zip file -->
<jar zipfile="${build_dir}/binary/jar/echopointng-${version}-sources.jar" >
<zipfileset dir="${build_dir}/source" prefix="echopointng" />
</jar>
</target>
<!-- ************************************************************************************************** -->
<!-- Create a release of the JavaDocs -->
<target name="releaseJavaDoc" depends="javadoc" description="Create a release of the JavaDocs">
<mkdir dir="${dist_dir}"/>
<copy file="${licence_doc}" todir="${javadoc_dir}"/>
<!-- Zip file -->
<jar zipfile="${build_dir}/binary/jar/echopointng-${version}-javadoc.jar" >
<zipfileset dir="${javadoc_dir}/docs" />
</jar>
</target>
<!-- ************************************************************************************************** -->
<target name="release"
depends="start,compile, releaseSrc,releaseJavaDoc"
description="Create all release packages">
<echo>
Release Version : ${version}
</echo>
<mkdir dir="${build_dir}/binary/lib"/>
<mkdir dir="${build_dir}/binary/jar"/>
<mkdir dir="${build_dir}/binary/war"/>
<copy file="${licence_doc}" todir="${build_dir}/binary"/>
<!-- Copy the third party jars into the release directory. -->
<copy todir="${build_dir}/binary/lib">
<fileset dir="${lib_dir}">
<patternset>
<include name="*.jar"/>
</patternset>
</fileset>
</copy>
<!-- Zip file -->
<zip zipfile="${dist_dir}/echopointng-${version}.zip">
<zipfileset dir="${build_dir}/binary" prefix="echopointng-${version}" />
</zip>
</target>
<!-- ************************************************************************************************** -->
<target name="default"
depends="start,clean,compile,release"
description="Default build">
<echo>
Done Building EchoPointNG
Version : ${version}
</echo>
</target>
</project>