-
Notifications
You must be signed in to change notification settings - Fork 42
/
build.xml
262 lines (227 loc) · 11.5 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
<project name="QuickServer.Project" default="jar" basedir=".">
<property name="app.name" value="QuickServer" />
<property name="main.build.dir" value="build/mainclasses" />
<property name="client.build.dir" value="build/clientclasses" />
<property name="qsadmingui.build.dir" value="build/qsadminguiclasses" />
<property name="test.build.dir" value="build/testcases" />
<property name="dist.dir" value="dist" />
<property name="src.dir" value="src" />
<property name="app.version" value="2.1.0" />
<property name="app.version.sub" value="" />
<property name="javac.deprecation" value="off" />
<path id="project.classpath">
<fileset dir="./dist/">
<include name="*.jar"/>
<exclude name="QuickServer.jar"/>
<exclude name="QuickServerClient.jar"/>
<exclude name="QSAdminGUI.jar"/>
</fileset>
</path>
<target name="help">
<echo>
Build for ${app.name} ${app.version} ${app.version.sub}
Available targets:
clean Cleans all dist and build dir.
compile_main Compiles the main source
compile_qsadmingui Compiles the QsAdminGUI source
compile Combines both compile_main and compile_qsadmingui
main_jar Creates main jar file.
qsadmingui_jar Creates main jar file.
jar Combines both main_jar and qsadmingui_jar
compileTests Compiles the test cases.
runTests Runs all the test cases.
docs Creates Java API docs
run_about Runs with -about flag
run_qsadmin Runs QSAdminGUI
</echo>
</target>
<target name="clean">
<delete dir="${main.build.dir}" />
<delete dir="${qsadmingui.build.dir}" />
<delete dir="${test.build.dir}" />
<delete file="${dist.dir}/${app.name}.jar" />
<delete file="${dist.dir}/QSAdminGUI.jar" />
<delete dir="docs" />
</target>
<target name="compile" depends="compile_main, compile_qsadmingui">
<echo>Done</echo>
</target>
<target name="compile_main">
<mkdir dir="${main.build.dir}"/>
<javac srcdir="${src.dir}" destdir="${main.build.dir}"
debug="on" optimize="on" listfiles="off"
deprecation="${javac.deprecation}" includeantruntime="false" target="1.5">
<include name="main/**"/>
<exclude name="main/org/quickserver/net/client/**"/>
<exclude name="main/org/quickserver/net/qsadmin/gui/**"/>
<exclude name="main/org/quickserver/util/xmlreader/QSAdminPluginConfig.java"/>
<exclude name="main/org/quickserver/util/xmlreader/PluginConfigReader.java"/>
<classpath refid="project.classpath"/>
</javac>
</target>
<target name="compile_client">
<mkdir dir="${client.build.dir}"/>
<javac srcdir="${src.dir}" destdir="${client.build.dir}"
debug="on" optimize="on" listfiles="off"
deprecation="${javac.deprecation}" includeantruntime="false" target="1.5">
<include name="main/org/quickserver/net/client/**"/>
<classpath refid="project.classpath"/>
</javac>
</target>
<target name="compile_qsadmingui">
<mkdir dir="${qsadmingui.build.dir}"/>
<javac destdir="${qsadmingui.build.dir}" debug="on" optimize="on"
listfiles="off" srcdir="${src.dir}"
deprecation="${javac.deprecation}" includeantruntime="false" target="1.5">
<include name="main/org/quickserver/net/qsadmin/gui/**"/>
<include name="main/org/quickserver/swing/*"/>
<include name="main/org/quickserver/util/*"/>
<include name="main/org/quickserver/util/xmlreader/QSAdminPluginConfig.java"/>
<include name="main/org/quickserver/util/xmlreader/PluginConfigReader.java"/>
<include name="main/org/quickserver/util/io/*FileList.java"/>
<include name="main/org/quickserver/util/io/PasswordField.java"/>
<include name="main/org/quickserver/util/io/MaskingThread.java"/>
<classpath refid="project.classpath"/>
</javac>
</target>
<target name="jar" depends="compile, compile_client, main_jar, client_jar, qsadmingui_jar">
<echo>Done</echo>
</target>
<target name="main_jar" depends="compile_main">
<mkdir dir="${main.build.dir}/icons"/>
<copy todir="${main.build.dir}/icons" overwrite="yes">
<fileset dir="${src.dir}/main/icons/">
<include name="*.gif"/>
<include name="*.png"/>
</fileset>
</copy>
<mkdir dir="${dist.dir}"/>
<copy file="README.md" todir="${main.build.dir}" overwrite="yes" />
<copy file="etc/quickserver_config.xsd"
todir="${dist.dir}" overwrite="yes" />
<copy file="etc/quickserver_config.dtd"
todir="${dist.dir}" overwrite="yes" />
<jar jarfile="${dist.dir}/${app.name}.jar"
basedir="${main.build.dir}" includes="**" manifest="${src.dir}/QuickServer.MF"/>
</target>
<target name="client_jar" depends="compile_client">
<copy file="README.md" todir="${client.build.dir}" overwrite="yes" />
<jar jarfile="${dist.dir}/${app.name}Client.jar"
basedir="${client.build.dir}" includes="**" />
</target>
<target name="qsadmingui_jar" depends="compile_qsadmingui">
<copy todir="${qsadmingui.build.dir}/icons" overwrite="yes">
<fileset dir="${src.dir}/main/icons/">
<include name="*.gif"/>
<include name="*.png"/>
</fileset>
</copy>
<mkdir dir="${dist.dir}"/>
<copy file="${src.dir}/main/org/quickserver/net/qsadmin/gui/conf/MainCommandPanel.xml"
todir="${qsadmingui.build.dir}/org/quickserver/net/qsadmin/gui/conf" overwrite="yes" />
<copy file="${src.dir}/main/org/quickserver/net/qsadmin/gui/conf/PropertieSet.xml"
todir="${qsadmingui.build.dir}/org/quickserver/net/qsadmin/gui/conf" overwrite="yes" />
<jar jarfile="${dist.dir}/QSAdminGUI.jar"
basedir="${qsadmingui.build.dir}" includes="**" manifest="${src.dir}/QSAdminGUI.MF"/>
</target>
<target name="done">
<tstamp>
<format property="TODAY_UK" pattern="d-MMMM-yyyy hh:mm:ss" locale="en"/>
</tstamp>
<echo>Time ${TODAY_UK}</echo>
</target>
<target name="docs" depends="compile">
<!--
<exec dir="." executable="javadoc">
<arg line="@options @packages -source 1.6 -classpath "/>
</exec>
-->
<delete dir = "docs" failonerror = "false"/>
<mkdir dir="docs"/>
<javadoc
use="true"
splitindex="true"
windowtitle="QuickServer v${app.version} API Specification"
overview="src/main/overview.html"
destdir="docs"
author="true"
version="true"
>
<packageset dir="src/main" defaultexcludes="yes">
<include name="org/quickserver/net/**" />
<include name="org/quickserver/net/server/*" />
<exclude name="org/quickserver/net/server/gui/**" />
<include name="org/quickserver/net/server/impl/**" />
<include name="org/quickserver/net/client/**" />
<include name="org/quickserver/net/qsadmin/gui/**" />
<include name="org/quickserver/sql/**" />
<include name="org/quickserver/util/**" />
<include name="org/quickserver/security/**" />
<include name="org/quickserver/swing/**" />
</packageset>
<doctitle><![CDATA[<b>QuickServer</b><br><font size="-1">v${app.version}</font>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2003-2014 QuickServer.org</i>]]></bottom>
<group title="Core Packages" packages="org.quickserver.net:org.quickserver.net.server"/>
<group title="Client Packages" packages="org.quickserver.net.client:org.quickserver.net.client.loaddistribution:org.quickserver.net.client.loaddistribution.impl:org.quickserver.net.client.monitoring:org.quickserver.net.client.monitoring.impl:org.quickserver.net.client.pool*"/>
<group title="Util Packages" packages="org.quickserver.util:org.quickserver.util.logging:org.quickserver.swing"/>
<group title="Thread Pool for App" packages="org.quickserver.util.pool.thread.app"/>
<group title="Support Packages" packages="org.quickserver.net.server.impl:org.quickserver.security:org.quickserver.net.qsadmin:org.quickserver.util.pool:org.quickserver.util.pool.thread:org.quickserver.sql:org.quickserver.util.io:org.quickserver.net.qsadmin.gui:org.quickserver.util.xmlreader"/>
<classpath>
<fileset dir="./dist/">
<include name="*.jar"/>
</fileset>
</classpath>
</javadoc>
<copy file="src/main/XMLConfiguration.xml"
todir="docs" overwrite="yes" />
<copy file="src/main/quickserver_logo.gif"
todir="docs" overwrite="yes" />
</target>
<target name="run_about" depends="main_jar">
<java fork="yes" classname="org.quickserver.net.server.QuickServer"
taskname="QuickServer" failonerror="true">
<arg value="-about"/>
<classpath>
<pathelement location="${dist.dir}/${app.name}.jar" />
<pathelement path="${java.class.path}" />
</classpath>
</java>
</target>
<target name="run_qsadmin" depends="qsadmingui_jar">
<java fork="yes" classname="org.quickserver.net.qsadmin.gui.QSAdmin"
taskname="QuickServer" failonerror="true">
<arg value="./plugin"/>
<classpath>
<pathelement location="${dist.dir}/QSAdminGUI.jar" />
<pathelement path="${java.class.path}" />
</classpath>
</java>
</target>
<!-- junit task -->
<target name="junit">
<available property="junit.present" classname="junit.framework.TestCase" />
</target>
<target name="compileTests" depends="jar, junit">
<mkdir dir="${test.build.dir}"/>
<javac srcdir="${src.dir}/test" destdir="${test.build.dir}">
<classpath>
<pathelement location="${dist.dir}/${app.name}.jar" />
<pathelement path="${dist.dir}/commons-logging.jar" />
</classpath>
<include name="**/*.java"/>
</javac>
</target>
<target name="runTests" depends="compileTests" if="junit.present">
<java fork="yes" classname="junit.textui.TestRunner"
taskname="junit" failonerror="true">
<arg value="test.org.quickserver.AllJUnitTests"/>
<classpath>
<pathelement location="${dist.dir}/${app.name}.jar" />
<pathelement location="${test.build.dir}" />
<pathelement path="" />
<pathelement path="${java.class.path}" />
</classpath>
</java>
</target>
<!-- junit task -->
</project>