This repository was archived by the owner on Jun 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
138 lines (119 loc) · 4.61 KB
/
build.xml
File metadata and controls
138 lines (119 loc) · 4.61 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
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
<project name="EncSync" basedir="." default="clean-build">
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="lib.dir" value="lib"/>
<property name="client-jar" value="${jar.dir}/${ant.project.name}-client.jar"/>
<property name="server-jar" value="${jar.dir}/${ant.project.name}-server.jar"/>
<property name="client-class" value="client.ClientMain"/>
<property name="server-class" value="server.ServerMain"/>
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="compile">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" source="1.7" target="1.7" includeantruntime="false"/>
</target>
<target name="jar-client" depends="compile">
<mkdir dir="${jar.dir}"/>
<jar destfile="${client-jar}" basedir="${classes.dir}">
<zipgroupfileset dir="${lib.dir}" includes="**/*.jar"/>
<manifest>
<attribute name="Main-Class" value="${client-class}"/>
</manifest>
</jar>
</target>
<target name="jar-server" depends="compile">
<mkdir dir="${jar.dir}"/>
<jar destfile="${server-jar}" basedir="${classes.dir}">
<zipgroupfileset dir="${lib.dir}" includes="**/*.jar"/>
<manifest>
<attribute name="Main-Class" value="${server-class}"/>
</manifest>
</jar>
</target>
<target name="run-client" depends="jar-client">
<java fork="true" classname="${client-class}">
<arg value="${arg0}"/>
<classpath>
<path refid="classpath"/>
<path location="${client-jar}"/>
</classpath>
</java>
</target>
<target name="run-server" depends="jar-server">
<java fork="true" classname="${server-class}">
<arg value="${arg0}"/>
<classpath>
<path refid="classpath"/>
<path location="${server-jar}"/>
</classpath>
</java>
</target>
<target name="register-user" depends="jar-client">
<java fork="true" classname="client.tools.PutAuthShell">
<arg value="${arg0}"/>
<classpath>
<path refid="classpath"/>
<path location="${client-jar}"/>
</classpath>
</java>
</target>
<target name="put-folder" depends="jar-client">
<java fork="true" classname="client.tools.PutFolderShell">
<arg value="${arg0}"/>
<classpath>
<path refid="classpath"/>
<path location="${client-jar}"/>
</classpath>
</java>
</target>
<target name="access-bundle" depends="jar-client">
<java fork="true" classname="client.tools.AccessBundleShell">
<classpath>
<path refid="classpath"/>
<path location="${client-jar}"/>
</classpath>
</java>
</target>
<target name="recover-client" depends="jar-client">
<java fork="true" classname="client.tools.ClientRecovery">
<arg value="${arg0}"/>
<classpath>
<path refid="classpath"/>
<path location="${client-jar}"/>
</classpath>
</java>
</target>
<target name="recover-server" depends="jar-server">
<java fork="true" classname="server.tools.ServerRecovery">
<arg value="${arg0}"/>
<classpath>
<path refid="classpath"/>
<path location="${server-jar}"/>
</classpath>
</java>
</target>
<path id="application" location="${client-jar}"/>
<target name="junit" depends="jar-client">
<junit printsummary="yes">
<classpath>
<path refid="classpath"/>
<path refid="application"/>
</classpath>
<formatter type="plain" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${src.dir}">
<include name="test/*Test.java"/>
<exclude name="test/ConfigAndBundleTest.java"/>
<exclude name="test/MiscTest.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="clean-build" depends="clean,jar-client,jar-server"/>
</project>