-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
105 lines (93 loc) · 3.58 KB
/
Copy pathbuild.xml
File metadata and controls
105 lines (93 loc) · 3.58 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
<project name="QueuingSystem" default="all" basedir=".">
<!-- set global properties for this build -->
<property name="src.dir" location="src"/>
<property name="build.dir" location="bin"/>
<property name="lib.dir" location="lib"/>
<property name="rsc.dir" location="resources"/>
<property name="client-class" value="asl.client.Client"/>
<property name="node-class" value="asl.middleware.Node"/>
<property name="benchmark-class" value="asl.benchmark.BenchmarkExecutor"/>
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<pathconvert property="manifest.classpath" pathsep=" ">
<path refid="classpath"/>
<mapper>
<chainedmapper>
<flattenmapper/>
<globmapper from="*.jar" to="lib/*.jar"/>
</chainedmapper>
</mapper>
</pathconvert>
<target name="compile" description="compiles the source">
<mkdir dir="${build.dir}"/>
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="classpath" includeantruntime="false" />
<copy todir="${build.dir}">
<fileset dir="${rsc.dir}"/>
</copy>
</target>
<target name="jar-client" depends="compile" description="generate a jar executable for the client" >
<jar jarfile="Client.jar" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="asl/client/Client" />
<attribute name="Class-Path" value="${manifest.classpath}"/>
</manifest>
</jar>
</target>
<target name="jar-node" depends="compile" description="generate a jar executable for the middleware" >
<jar jarfile="Node.jar" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="asl/middleware/Node" />
<attribute name="Class-Path" value="${manifest.classpath}"/>
</manifest>
</jar>
</target>
<target name="jar-benchmark" depends="compile" description="generate a jar executable for benchmarking" >
<jar jarfile="Benchmark.jar" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="asl/benchmark/BenchmarkExecutor" />
<attribute name="Class-Path" value="${manifest.classpath}"/>
</manifest>
</jar>
</target>
<target name="run-client" depends="jar-client" description="execute the jar file" >
<java classname="${client-class}" fork="true">
<classpath>
<path refid="classpath"/>
<path location="Client.jar"/>
</classpath>
<arg value="${host}"/>
<arg value="${port}"/>
<arg value="${id}"/>
</java>
</target>
<target name="run-node" depends="jar-node" description="execute the middleware node" >
<java classname="${node-class}" fork="true">
<classpath>
<path refid="classpath"/>
<path location="Node.jar"/>
</classpath>
<arg value="${port}"/>
<arg value="${dbhost}"/>
<arg value="${dbport}"/>
<arg value="${workers}"/>
<arg value="${cons}"/>
</java>
</target>
<target name="run-benchmark" depends="jar-benchmark" description="execute benchmark" >
<java classname="${benchmark-class}" fork="true">
<classpath>
<path refid="classpath"/>
<path location="Benchmark.jar"/>
</classpath>
<arg value="${host}"/>
<arg value="${port}"/>
</java>
</target>
<target name="clean" description="clean up" >
<delete dir="${build.dir}"/>
<delete file="$Client.jar"/>
</target>
<target name="rebuild" depends="clean, compile" description="Clean and build products." />
<target name="all" depends="run-node, run-client, run-benchmark" description="Compile and run all products." />
</project>