-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.xml
308 lines (289 loc) · 11.4 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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<project name="jwt" default="all" basedir=".">
<!-- Name of project and version -->
<property name="proj.name" value="jwt"/>
<property name="proj.version" value="4.11.1"/>
<!-- Global properties for this build -->
<property name="src.java.dir" value="src"/>
<property name="test.java.dir" value="test"/>
<property name="report.dir" value="report"/>
<property name="build.dir" value="build"/>
<property name="dist.dir" value="dist"/>
<property name="archives.dir" value="archives"/>
<property name="mvn.dir" value="mvn"/>
<property name="javadoc.jwt.dir" value="doc/javadoc"/>
<property name="javadoc.jwt-auth.dir" value="doc/auth/javadoc"/>
<property name="javadoc.thirdparty.dir" value="doc/thirdparty/javadoc"/>
<property name="userguide.dir" value="doc/userguide"/>
<!-- Javadoc classpath declaration -->
<path id="project.javadoc.classpath">
<fileset dir=".">
<include name="lib/javamail/*.jar"/>
<include name="lib/pdfjet/*.jar"/>
<include name="lib/gson/*.jar"/>
<include name="lib/http/*.jar"/>
<include name="lib/jpa/*.jar"/>
<include name="lib/jogl/*.jar"/>
<include name="lib/servlet-api/*.jar"/>
<include name="lib/vt-password/*.jar"/>
<include name="lib/*.jar"/>
<include name="dist/*.jar"/>
</fileset>
</path>
<target name="all" depends="dist">
</target>
<!-- Clean up -->
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${archives.dir}" />
<delete dir="${mvn.dir}" />
<delete includeemptydirs="true">
<fileset dir="${javadoc.jwt.dir}" includes="**/*" excludes=".gitignore"/>
</delete>
</target>
<target name="run">
<java jar="lib/antlr-4.7.2-complete.jar" fork="true" dir="src/eu/webtoolkit/jwt">
<arg line="-no-listener -visitor -package eu.webtoolkit.jwt PluralExpression.g4" />
</java>
<java jar="lib/antlr-4.7.2-complete.jar" fork="true" dir="src/eu/webtoolkit/jwt/render">
<arg line="-listener -no-visitor -package eu.webtoolkit.jwt.render Css22.g4" />
</java>
</target>
<!-- Compile Java source -->
<target name="build" depends = "run">
<mkdir dir="${build.dir}"/>
<javac
srcdir="${src.java.dir}"
destdir="${build.dir}"
debug="on"
release="11">
<src path="${src.java.dir}"/>
<src path="${test.java.dir}"/>
<classpath >
<path id="project.classpath">
<fileset dir=".">
<include name="lib/*.jar"/>
<include name="lib/javamail/*.jar"/>
<include name="lib/pdfjet/*.jar"/>
<include name="lib/gson/*.jar"/>
<include name="lib/http/*.jar"/>
<include name="lib/jpa/*.jar"/>
<include name="lib/jogl/*.jar"/>
<include name="lib/servlet-api/*.jar"/>
<include name="lib/vt-password/*.jar"/>
</fileset>
</path>
</classpath>
</javac>
<copy todir="${build.dir}/eu/webtoolkit/jwt/skeletons">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/skeletons"/>
</copy>
<copy todir="${build.dir}/resources/wt-resources">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/wt-resources"/>
</copy>
<copy todir="${build.dir}/eu/webtoolkit/jwt/wt-resources">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/wt-resources"/>
</copy>
<copy todir="${build.dir}">
<fileset dir="${src.java.dir}" defaultexcludes="yes">
<include name="eu/webtoolkit/jwt/*.java"/>
<include name="eu/webtoolkit/jwt/*.xml"/>
<include name="eu/webtoolkit/jwt/servlet/*.java"/>
<exclude name="eu/webtoolkit/jwt/servlet/HttpUtils.java"/>
<include name="eu/webtoolkit/jwt/chart/*.java"/>
<include name="eu/webtoolkit/jwt/render/*.java"/>
<exclude name="eu/webtoolkit/jwt/render/CssData.java"/>
<exclude name="eu/webtoolkit/jwt/render/CssData_p.java"/>
<include name="eu/webtoolkit/jwt/auth/*.java"/>
<include name="eu/webtoolkit/jwt/auth/*.xml"/>
<include name="eu/webtoolkit/jwt/auth/jpa/*.java"/>
<include name="eu/webtoolkit/jwt/auth/mfa/*.java"/>
<include name="eu/webtoolkit/jwt/utils/*.java"/>
<include name="eu/webtoolkit/jwt/utils/whatwg/*.java"/>
<include name="eu/webtoolkit/jwt/thirdparty/qrcodegen/*.java"/>
</fileset>
</copy>
</target>
<target name="test" depends="build">
<mkdir dir="${report.dir}"/>
<junit printsummary="yes" haltonfailure="no">
<classpath refid="project.classpath" />
<classpath location="${build.dir}" />
<classpath location="${test.java.dir}" />
<classpath location="." />
<formatter type="plain" />
<formatter type="xml" />
<batchtest fork="yes" todir="${report.dir}">
<fileset dir="${test.java.dir}">
<include name="**/*Test*.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="javadoc" depends="dist">
<javadoc
access="protected"
destdir="${javadoc.jwt.dir}"
author="true"
version="true"
use="true"
windowtitle="JWt Javadoc API"
classpathref="project.javadoc.classpath"
overview="overview.html"
additionalparam="-Xdoclint:none"
>
<fileset dir="${src.java.dir}" defaultexcludes="yes">
<include name="eu/webtoolkit/jwt/*.java"/>
<include name="eu/webtoolkit/jwt/servlet/*.java"/>
<include name="eu/webtoolkit/jwt/chart/*.java"/>
<include name="eu/webtoolkit/jwt/render/*.java"/>
<include name="eu/webtoolkit/jwt/utils/WebGraphics2D.java"/>
<exclude name="eu/webtoolkit/jwt/XSSFilter.java"/>
<exclude name="eu/webtoolkit/jwt/ServletApi25.java"/>
<exclude name="eu/webtoolkit/jwt/ServletApi3.java"/>
<include name="eu/webtoolkit/jwt/auth/*.java"/>
<include name="eu/webtoolkit/jwt/auth/jpa/*.java"/>
<include name="eu/webtoolkit/jwt/auth/mfa/*.java"/>
<include name="eu/webtoolkit/jwt/thirdparty/qrcodegen/*.java"/>
</fileset>
</javadoc>
<copy todir="${javadoc.jwt.dir}/eu/webtoolkit/jwt/doc-files">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/doc-files"/>
</copy>
<copy todir="${javadoc.jwt.dir}/eu/webtoolkit/jwt/chart/doc-files">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/chart/doc-files"/>
</copy>
</target>
<target name="mvn-javadoc" depends="dist">
<mkdir dir="${mvn.dir}"/>
<javadoc
access="protected"
destdir="${mvn.dir}/${javadoc.jwt.dir}"
author="true"
version="true"
use="true"
windowtitle="JWt Javadoc API"
classpathref="project.javadoc.classpath"
overview="overview.html"
>
<fileset dir="${src.java.dir}" defaultexcludes="yes">
<include name="eu/webtoolkit/jwt/*.java"/>
<include name="eu/webtoolkit/jwt/servlet/*.java"/>
<include name="eu/webtoolkit/jwt/chart/*.java"/>
<include name="eu/webtoolkit/jwt/render/*.java"/>
<include name="eu/webtoolkit/jwt/utils/WebGraphics2D.java"/>
<exclude name="eu/webtoolkit/jwt/XSSFilter.java"/>
<exclude name="eu/webtoolkit/jwt/ServletApi25.java"/>
<exclude name="eu/webtoolkit/jwt/ServletApi3.java"/>
</fileset>
</javadoc>
<copy
todir="${mvn.dir}/${javadoc.jwt.dir}/eu/webtoolkit/jwt/doc-files">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/doc-files"/>
</copy>
<copy
todir="${mvn.dir}/${javadoc.jwt.dir}/eu/webtoolkit/jwt/chart/doc-files">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/chart/doc-files"/>
</copy>
<javadoc
access="protected"
destdir="${mvn.dir}/${javadoc.jwt-auth.dir}"
author="true"
version="true"
use="true"
windowtitle="JWt Auth Javadoc API"
classpathref="project.javadoc.classpath"
overview="overview.html"
link="../jwt/"
>
<fileset dir="${src.java.dir}" defaultexcludes="yes">
<include name="eu/webtoolkit/jwt/auth/*.java"/>
<include name="eu/webtoolkit/jwt/auth/jpa/*.java"/>
<include name="eu/webtoolkit/jwt/auth/mfa/*.java"/>
</fileset>
</javadoc>
</target>
<target name="asciidoc">
<exec executable="asciidoctor">
<arg value="-a" /><arg value="toc" />
<arg value="-a" /><arg value="numbered" />
<arg value="-a" /><arg value="icons=font" />
<arg value="-a" /><arg value="source-highlighter=highlight.js" />
<arg value="-a" /><arg value="linkcss" />
<arg value="-a" /><arg value="stylesheet=jwt.css" />
<arg value="-o" /><arg value="${userguide.dir}/userguide.html" />
<arg value="${userguide.dir}/userguide.adoc" />
</exec>
</target>
<target name="dist" depends="build">
<mkdir dir="${dist.dir}"/>
<jar destfile="dist/jwt-${proj.version}.jar"
basedir="${build.dir}"
defaultexcludes="yes"
includes="eu/webtoolkit/jwt/*
eu/webtoolkit/jwt/servlet/*
eu/webtoolkit/jwt/chart/*
eu/webtoolkit/jwt/render/*
eu/webtoolkit/jwt/utils/*
eu/webtoolkit/jwt/utils/whatwg/*
net/n3/nanoxml/*
eu/webtoolkit/jwt/skeletons/*
eu/webtoolkit/jwt/wt-resources/**/*">
<metainf dir="${build.dir}" includes="resources/wt-resources/**/*"/>
</jar>
<jar destfile="dist/jwt-auth-${proj.version}.jar"
basedir="${build.dir}"
defaultexcludes="yes"
includes="eu/webtoolkit/jwt/auth/*
eu/webtoolkit/jwt/auth/jpa/*
eu/webtoolkit/jwt/auth/mfa/*
eu/webtoolkit/jwt/thirdparty/*
eu/webtoolkit/jwt/thirdparty/qrcodegen/*" />
</target>
<target name="mvn" depends="mvn-javadoc">
<jar jarfile="dist/jwt-${proj.version}-javadoc.jar">
<fileset dir="${mvn.dir}/${javadoc.jwt.dir}" />
</jar>
<jar jarfile="dist/jwt-auth-${proj.version}-javadoc.jar">
<fileset dir="${mvn.dir}/${javadoc.jwt-auth.dir}" />
</jar>
<jar jarfile="dist/jwt-${proj.version}-sources.jar">
<fileset dir="${src.java.dir}" defaultexcludes="yes">
<include name="eu/webtoolkit/jwt/*.java"/>
<include name="eu/webtoolkit/jwt/*.xml"/>
<include name="eu/webtoolkit/jwt/servlet/*.java"/>
<include name="eu/webtoolkit/jwt/chart/*.java"/>
<include name="eu/webtoolkit/jwt/render/*.java"/>
<include name="eu/webtoolkit/jwt/utils/*.java"/>
<include name="eu/webtoolkit/jwt/utils/whatwg/*.java"/>
</fileset>
</jar>
<jar jarfile="dist/jwt-auth-${proj.version}-sources.jar">
<fileset dir="${src.java.dir}" defaultexcludes="yes">
<include name="eu/webtoolkit/jwt/auth/*.java"/>
<include name="eu/webtoolkit/jwt/auth/jpa/*.java"/>
<include name="eu/webtoolkit/jwt/auth/mfa/*.java"/>
<include name="eu/webtoolkit/jwt/auth/*.xml"/>
<include name="eu/webtoolkit/jwt/thirdparty/qrcodegen/*.java"/>
</fileset>
</jar>
</target>
<target name="archive" >
<delete dir="${build.dir}" />
<mkdir dir="${archives.dir}" />
<zip destfile="${archives.dir}/jwt-${proj.version}.zip">
<zipfileset
dir="."
prefix="jwt-${proj.version}/"
excludes=".git/**,.git*,${archives.dir}/**" />
</zip>
<tar destfile="${archives.dir}/jwt-${proj.version}.tar.gz" compression="gzip">
<tarfileset
dir="."
prefix="jwt-${proj.version}/"
excludes=".git/**,.git*,${archives.dir}/**" />
</tar>
</target>
<target name="release" depends="dist,javadoc,asciidoc,archive" >
</target>
</project>