-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
233 lines (169 loc) · 6.22 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
<project name="Flexmet" default="all" basedir="./">
<path id="lib-classpath">
<fileset dir="./lib">
<include name="*.jar"/>
</fileset>
</path>
<path id="b">
<fileset dir="./">
<include name="*.jar"/>
</fileset>
</path>
<path id="clientBuild">
<fileset dir="client/lib/">
<include name="*.jar"/>
</fileset>
</path>
<!-- Defining paths for the build process -->
<property name="clientSourceDirectory" location="./client/source/"/>
<property name="clientDeployDirectory" location="./client_deploy/"/>
<property name="clientLibDirectory" location="./client/lib/"/>
<property name="clientBuildDirectory" location="./client/bin/"/>
<property name="clientRuntimeLib" location="./client_lib/"/>
<property name="thriftRuntimeLib" location="./thrift/gen-java/"/>
<property name="serverSourceDirectory" location="./server/source/"/>
<property name="serverDeployDirectory" location="./server_deploy/"/>
<property name="serverLibDirectory" location="./server/lib/"/>
<property name="serverBuildDirectory" location="./server/bin/"/>
<property name="serverRuntimeLib" location="./server_lib/"/>
<property name="hudSourceDirectory" location="./hud/source/"/>
<property name="hudDeployDirectory" location="./hud_deploy/"/>
<property name="hudLibDirectory" location="./hud/lib/"/>
<property name="hudBuildDirectory" location="./hud/bin/"/>
<property name="hudRuntimeLib" location="./hud_lib/"/>
<property name="globalLib" location="./lib/"/>
<property name="globalLibSource" location="./lib_source/"/>
<!-- Defining names for everything -->
<property name="clientJarName" value="flexmet-client.jar"/>
<property name="serverJarName" value="flexmet-server.jar"/>
<property name="hudJarName" value="flexmet-hud.jar"/>
<path id="deployClassPath">
<fileset dir="${clientDeployDirectory}">
<include name=".jar"/>
</fileset>
</path>
<!-- Variables for the Build Process -->
<!-- Targets: -->
<target name="all" depends="clean">
<antcall target="client"/>
<antcall target="server"/>
<antcall target="hud"/>
</target>
<target name="client">
<echo message="Building client"/>
<mkdir dir="${clientBuildDirectory}"/>
<javac destdir="${clientBuildDirectory}" includeantruntime="false" debug="on" debuglevel="lines,vars,source">
<!--compilerarg value="-Xlint:unchecked"/ -->
<src path="${clientSourceDirectory}"/>
<src path="${globalLibSource}"/>
<src path="${thriftRuntimeLib}"/>
<classpath>
<pathelement path="${clientLibDirectory}"/>
<pathelement path="${globalLibSource}"/>
<pathelement path="${globalLib}"/>
</classpath>
<classpath refid="lib-classpath"/>
<classpath refid="clientBuild"/>
</javac>
<mkdir dir="${clientDeployDirectory}"/>
<copy toDir="${clientDeployDirectory}">
<fileset dir="${clientLibDirectory}"/>
</copy>
<copy toDir="${clientDeployDirectory}">
<fileset dir="${globalLib}"/>
</copy>
<manifestclasspath property="lib.list" jarfile="${clientDeployDirectory}/${clientJarName}">
<classpath refid="lib-classpath"/>
</manifestclasspath>
<!-- Time to build the Jar -->
<jar destfile="${clientDeployDirectory}/${clientJarName}" basedir="${clientBuildDirectory}">
<manifest>
<attribute name="Main-Class" value="Main"/>
<attribute name="Class-Path" value="libthrift-0.9.0.jar quartz-2.1.6.jar"/>
</manifest>
<zipgroupfileset dir="${globalLib}" includes="*.jar"/>
</jar>
<echo message="client Build completed"/>
</target>
<target name="server">
<echo message="Building server"/>
<javac destdir="${serverBuildDirectory}" includeantruntime="false">
<src path="${serverSourceDirectory}"/>
<src path="${globalLibSource}"/>
<classpath>
<pathelement path="${serverLibDirectory}"/>
<pathelement path="${globalLibSource}"/>
</classpath>
</javac>
<mkdir dir="${serverDeployDirectory}"/>
<!-- Time to build the Jar -->
<jar destfile="${serverDeployDirectory}/${serverJarName}" basedir="${serverBuildDirectory}">
<manifest>
<attribute name="Main-Class" value="Main"/>
<attribute name="Class-Path" value="${serverDeployDirectory}"/>
</manifest>
</jar>
<copy toDir="${serverDeployDirectory}">
<fileset dir="${serverLibDirectory}"/>
</copy>
<copy toDir="${serverDeployDirectory}">
<fileset dir="${globalLib}"/>
</copy>
<echo message="server Build completed"/>
</target>
<target name="hud">
<echo message="Building hud"/>
<javac destdir="${hudBuildDirectory}" includeantruntime="false">
<src path="${hudSourceDirectory}"/>
<src path="${globalLibSource}"/>
<classpath>
<pathelement path="${hudLibDirectory}"/>
<pathelement path="${globalLibSource}"/>
</classpath>
</javac>
<mkdir dir="${hudDeployDirectory}"/>
<!-- Time to build the Jar -->
<jar destfile="${hudDeployDirectory}/${serverJarName}" basedir="${hudBuildDirectory}">
<manifest>
<attribute name="Main-Class" value="Main"/>
<attribute name="Class-Path" value="${hudDeployDirectory}"/>
</manifest>
</jar>
<copy toDir="${hudDeployDirectory}">
<fileset dir="${hudLibDirectory}"/>
</copy>
<copy toDir="${serverDeployDirectory}">
<fileset dir="${globalLib}"/>
</copy>
<echo message="hud Build completed"/>
</target>
<target name="clean">
<antcall target="cleanClient"/>
<antcall target="cleanServer"/>
<antcall target="cleanHud"/>
</target>
<target name="cleanClient">
<echo message="Running clean on the client"/>
<delete includeemptydirs="true">
<fileset dir="${clientBuildDirectory}" includes="**/*"/>
</delete>
<delete dir="${clientDeployDirectory}"/>
<echo message="Finished clean on the client"/>
</target>
<target name="cleanServer">
<echo message="Running clean on the server"/>
<delete includeemptydirs="true">
<fileset dir="${serverBuildDirectory}" includes="**/*"/>
</delete>
<delete dir="${serverDeployDirectory}"/>
<echo message="Finished clean on the server"/>
</target>
<target name="cleanHud">
<echo message="Running clean on the hud"/>
<delete includeemptydirs="true">
<fileset dir="${hudBuildDirectory}" includes="**/*"/>
</delete>
<delete dir="${hudDeployDirectory}"/>
<echo message="Finished clean on the hud"/>
</target>
</project>