-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildCopy.xml
97 lines (79 loc) · 3.3 KB
/
buildCopy.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="homework1" default="dist" basedir=".">
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="host" value="localhost"/>
<property name="workerPort" value="1095"/>
<!-- codebase properties -->
<property name="file_codebase" location="c:/java/build/" />
<property name="web_codebase" value="file:/C:\\java\\build\\" />
<target name="compile" description="compile the source">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}"/>
</target>
<target name="dist" depends="compile" description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<!-- Make system jar file -->
<jar jarfile="${dist}/system.jar" basedir="${build}" includes="system/** api/**"/>
<!-- Make client jar file -->
<jar jarfile="${dist}/client.jar" basedir="${build}" includes="client/** api/** tasks/**"/>
<!-- Copy client's task classes to client's codebase -->
<mkdir dir="${file_codebase}"/>
<copy todir="${file_codebase}">
<fileset dir="${build}"/>
</copy>
</target>
<target name="javadoc" description="create javadocs">
<javadoc packagenames="tasks.*,api.*" sourcepath="${src}" destdir="documents/javadoc" />
</target>
<target name="worker" depends="dist" description="Start a worker" >
<java classname="system.WorkerImpl" fork="true">
<jvmarg value="-Djava.rmi.server.codebase=${web_codebase}"/>
<jvmarg value="-Djava.security.policy=policy"/>
<arg value="${host}"/>
<arg value="${workerPort}"/>
<classpath>
<pathelement location="dist/system.jar"/>
</classpath>
</java>
</target>
<target name="space" depends="dist" description="Start a space" >
<java classname="system.SpaceImpl" fork="true">
<jvmarg value="-Djava.rmi.server.codebase=${web_codebase}"/>
<jvmarg value="-Djava.security.policy=policy"/>
<classpath>
<pathelement location="dist/system.jar"/>
</classpath>
</java>
</target>
<target name="fib" depends="dist" description="Start a fib task" >
<java classname="client.ClientImpl" fork="true">
<jvmarg value="-Djava.rmi.server.codebase=${web_codebase}"/>
<jvmarg value="-Djava.security.policy=policy"/>
<arg value="${host}"/>
<classpath>
<pathelement location="dist/client.jar"/>
</classpath>
</java>
</target>
<target name="tsp" depends="dist" description="Run a TSP client" >
<java classname="client.TspClient" fork="true">
<jvmarg value="-Djava.rmi.server.codebase=${web_codebase}"/>
<jvmarg value="-Djava.security.policy=policy"/>
<arg value="${host}"/>
<classpath>
<pathelement location="dist/client.jar"/>
</classpath>
</java>
</target>
<target name="clean" description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>