-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
291 lines (261 loc) · 13.1 KB
/
build.xml
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
<?xml version="1.0"?>
<!--
* This file is part of the Echo Web Application Framework (hereinafter "Echo").
* Copyright (C) 2002-2009 NextApp, Inc.
*
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
-->
<project name="NextApp_Echo_2_Extras" default="dist" basedir=".">
<property environment="env"/>
<property file="ant.properties"/>
<patternset id="fileset.resources">
<include name="**/*properties"/>
<include name="**/*html"/>
<include name="**/*js"/>
<include name="**/*gif"/>
<include name="**/*jpg"/>
<include name="**/*png"/>
<include name="**/*xml"/>
<include name="**/*stylesheet"/>
</patternset>
<!-- Minimize -->
<target name="minimize" depends="clean" description="Removes all non-essential files, including Eclipse temporary/build output files">
<delete dir="${dir.temp}"/>
</target>
<!-- Clean -->
<target name="clean"
description="Clears all generated files, including build directories, distributables, and documentation">
<delete dir="${dir.build}"/>
<delete dir="${dir.dist}"/>
<delete dir="${dir.javadoc}"/>
<delete dir="${dir.testoutput}"/>
<delete dir="${dir.release}"/>
</target>
<target name="compile.app" description="Compile File Transfer Library">
<mkdir dir="${dir.build.app}"/>
<javac srcdir="${dir.src.app}" destdir="${dir.build.app}" debug="${debug}" deprecation="yes">
<classpath>
<pathelement path="${echo2.app.lib.jar}"/>
</classpath>
</javac>
<copy todir="${dir.build.app}">
<fileset dir="${dir.src.app}">
<patternset refid="fileset.resources"/>
</fileset>
</copy>
</target>
<target name="dist.app" depends="clean,compile.app">
<mkdir dir="${dir.dist.lib}"/>
<jar jarfile="${dir.dist.lib}/${jarfile.extras.app}" basedir="${dir.build.app}"/>
</target>
<target name="compile.webcontainer" depends="compile.app"
description="Compile Echo Web Application Container">
<mkdir dir="${dir.build.webcontainer}"/>
<javac srcdir="${dir.src.webcontainer}" destdir="${dir.build.webcontainer}" debug="${debug}" deprecation="yes">
<classpath>
<pathelement path="${dir.build.app}"/>
<pathelement path="${echo2.webcontainer.lib.jar}"/>
<pathelement path="${echo2.webrender.lib.jar}"/>
<pathelement path="${echo2.app.lib.jar}"/>
<pathelement path="${servlet.lib.jar}"/>
</classpath>
</javac>
<copy todir="${dir.build.webcontainer}">
<fileset dir="${dir.src.webcontainer}">
<patternset refid="fileset.resources"/>
</fileset>
</copy>
</target>
<target name="dist.webcontainer" depends="clean,compile.webcontainer">
<mkdir dir="${dir.dist.lib}"/>
<jar jarfile="${dir.dist.lib}/${jarfile.extras.webcontainer}" basedir="${dir.build.webcontainer}"/>
</target>
<target name="dist" depends="clean, dist.app, dist.webcontainer"/>
<target name="compile.testapp" depends="dist">
<mkdir dir="${dir.build.testapp}/WEB-INF/classes"/>
<mkdir dir="${dir.build.testapp}/WEB-INF/lib"/>
<copy todir="${dir.build.testapp}/WEB-INF/lib" file="${echo2.app.lib.jar}"/>
<copy todir="${dir.build.testapp}/WEB-INF/lib" file="${echo2.webcontainer.lib.jar}"/>
<copy todir="${dir.build.testapp}/WEB-INF/lib" file="${echo2.webrender.lib.jar}"/>
<copy todir="${dir.build.testapp}/WEB-INF/lib" file="${dir.dist.lib}/${jarfile.extras.app}"/>
<copy todir="${dir.build.testapp}/WEB-INF/lib" file="${dir.dist.lib}/${jarfile.extras.webcontainer}"/>
<copy todir="${dir.build.testapp}/WEB-INF">
<fileset dir="${dir.deploy.testapp}"/>
</copy>
<copy todir="${dir.build.testapp}">
<fileset dir="${dir.htdocs.testapp}"/>
</copy>
<javac srcdir="${dir.src.testapp}" destdir="${dir.build.testapp}/WEB-INF/classes" debug="${debug}" deprecation="yes">
<classpath>
<pathelement path="${dir.dist.lib}/${jarfile.extras.app}"/>
<pathelement path="${dir.dist.lib}/${jarfile.extras.webcontainer}"/>
<pathelement path="${servlet.lib.jar}"/>
<pathelement path="${echo2.app.lib.jar}"/>
<pathelement path="${echo2.webcontainer.lib.jar}"/>
<pathelement path="${echo2.webrender.lib.jar}"/>
</classpath>
</javac>
<copy todir="${dir.build.testapp}/WEB-INF/classes">
<fileset dir="${dir.src.testapp}">
<patternset refid="fileset.resources"/>
</fileset>
</copy>
</target>
<target name="dist.testapp" depends="compile.testapp"
description="Builds a web archive of the interactive test application">
<mkdir dir="${dir.dist.testapp}"/>
<jar jarfile="${dir.dist.testapp}/${warfile.testapp}" basedir="${dir.build.testapp}"/>
</target>
<target name="doc.app"
description="Create public/protected JavaDoc Document for Echo2Extras Library">
<mkdir dir="${dir.javadoc.app.public}"/>
<javadoc sourcepath="${dir.src.app}" packagenames="nextapp.echo2.extras.app.*"
stylesheetfile="${javadoc.cssfile}"
destdir="${dir.javadoc.app.public}"
WindowTitle="${javadoc.windowtitle}"
DocTitle="${javadoc.doctitle.app}"
Overview="${dir.src.app}/app-overview.html"
Header="${javadoc.header}">
<classpath>
<pathelement path="${echo2.app.lib.jar}"/>
</classpath>
</javadoc>
</target>
<target name="doc.app.private"
description="Create private JavaDoc Document for Echo2Extras Library">
<mkdir dir="${dir.javadoc.app.private}"/>
<javadoc sourcepath="${dir.src.app}" packagenames="nextapp.echo2.extras.app.*"
stylesheetfile="${javadoc.cssfile}"
destdir="${dir.javadoc.app.private}"
WindowTitle="${javadoc.windowtitle}"
DocTitle="${javadoc.doctitle.app}"
Overview="${dir.src.app}/app-overview.html"
Header="${javadoc.header}"
Private="true">
<classpath>
<pathelement path="${echo2.app.lib.jar}"/>
</classpath>
</javadoc>
</target>
<target name="doc.webcontainer"
description="Create public/protected JavaDoc Document for Echo File Transfer Web Container">
<mkdir dir="${dir.javadoc.webcontainer.public}"/>
<javadoc sourcepath="${dir.src.app};${dir.src.webcontainer}" packagenames="nextapp.echo2.extras.webcontainer.*"
stylesheetfile="${javadoc.cssfile}"
destdir="${dir.javadoc.webcontainer.public}"
WindowTitle="${javadoc.windowtitle}"
DocTitle="${javadoc.doctitle.webcontainer}"
Overview="${dir.src.webcontainer}/webcontainer-overview.html"
Header="${javadoc.header}">
<classpath>
<pathelement path="${echo2.app.lib.jar}"/>
<pathelement path="${echo2.webcontainer.lib.jar}"/>
<pathelement path="${echo2.webrender.lib.jar}"/>
<pathelement path="${servlet.lib.jar}"/>
</classpath>
</javadoc>
</target>
<target name="doc.webcontainer.private"
description="Create private JavaDoc Document for Echo Web Application Container">
<mkdir dir="${dir.javadoc.webcontainer.private}"/>
<javadoc sourcepath="${dir.src.app};${dir.src.webcontainer}" packagenames="nextapp.echo2.extras.webcontainer.*"
stylesheetfile="${javadoc.cssfile}"
destdir="${dir.javadoc.webcontainer.private}"
WindowTitle="${javadoc.windowtitle}"
DocTitle="${javadoc.doctitle.webcontainer}"
Overview="${dir.src.webcontainer}/webcontainer-overview.html"
Header="${javadoc.header}"
Private="true">
<classpath>
<pathelement path="${echo2.app.lib.jar}"/>
<pathelement path="${echo2.webcontainer.lib.jar}"/>
<pathelement path="${echo2.webrender.lib.jar}"/>
<pathelement path="${servlet.lib.jar}"/>
</classpath>
</javadoc>
</target>
<target name="doc.public"
depends="doc.app, doc.webcontainer"/>
<target name="doc.private"
depends="doc.app.private, doc.webcontainer.private"/>
<target name="doc"
depends="doc.app, doc.app.private, doc.webcontainer, doc.webcontainer.private"/>
<target name="release" depends="clean, dist, dist.testapp, doc.public">
<mkdir dir="${dir.build.release.root}"/>
<mkdir dir="${dir.build.release.root}/SourceCode"/>
<mkdir dir="${dir.build.release.root}/SourceCode/src"/>
<mkdir dir="${dir.build.release.root}/Documentation"/>
<mkdir dir="${dir.build.release.root}/BinaryLibraries"/>
<mkdir dir="${dir.build.release.root}/BinaryApplications"/>
<mkdir dir="${dir.build.release.root}/Licensing"/>
<copy todir="${dir.build.release.root}" file="${dir.resource}/readme.txt"/>
<!-- Source Code -->
<copy todir="${dir.build.release.root}/SourceCode/src">
<fileset dir="${dir.src}">
<exclude name=".svn/**"/>
</fileset>
</copy>
<copy todir="${dir.build.release.root}/SourceCode/resource">
<fileset dir="${dir.resource}">
<exclude name=".svn/**"/>
</fileset>
</copy>
<copy todir="${dir.build.release.root}/SourceCode">
<fileset file="build.xml"/>
<fileset file="ant.properties"/>
</copy>
<!-- Binary Libraries -->
<copy todir="${dir.build.release.root}/BinaryLibraries">
<fileset dir="${dir.dist.lib}"/>
</copy>
<!-- Binary Web Applications: Test Application -->
<copy todir="${dir.build.release.root}/BinaryApplications">
<fileset dir="${dir.dist.testapp}"/>
</copy>
<!-- Documentation -->
<copy todir="${dir.build.release.root}/Documentation/api/public">
<fileset dir="${dir.javadoc.public}"/>
</copy>
<copy todir="${dir.build.release.root}/Documentation">
<fileset dir="${dir.resource}/Documentation"/>
</copy>
<!-- Licensing -->
<copy todir="${dir.build.release.root}/Licensing">
<fileset dir="${dir.resource}/Licensing"/>
</copy>
<!-- Zip & TarGz -->
<mkdir dir="${dir.release}"/>
<zip zipfile="${dir.release}/${zipfile.release}" basedir="${dir.build.release}"/>
<tar tarfile="${dir.release}/${tarfile.release}" basedir="${dir.build.release}" longfile="gnu"/>
<gzip src="${dir.release}/${tarfile.release}" zipfile="${dir.release}/${tgzfile.release}"/>
<delete file="${dir.release}/${tarfile.release}"/>
</target>
<target name="jslint">
<java fork="true" jar="${dir.resource.jslint}/rhino.jar">
<arg value="${dir.resource.jslint}/jslint.js"/>
<arg value="${dir.src.webcontainer}/nextapp/echo2/extras/webcontainer/resource/js/"/>
</java>
</target>
</project>