-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
113 lines (103 loc) · 4.34 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="hci">
<property environment="env"/>
<property name="src.dir" value="Source"/>
<property name="lib.dir" value="../lib" />
<property name="junit.output.dir" value="junit"/>
<property name="junit.dir" value="${lib.dir}/junit-4.8.2.jar" />
<property name="build.dir" value="build"/>
<property name="dist.dir" value="dist"/>
<property name="boot-jar" value="build/bootstrap.jar"/>
<property name="cofoja-jar" value="${lib.dir}/cofoja.jar"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<path id="classpath">
<pathelement location="${build.dir}"/>
<pathelement location="${junit.dir}"/>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="init">
<mkdir dir="${build.dir}"/>
<copy includeemptydirs="false" todir="${build.dir}">
<fileset dir="${src.dir}">
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="dist" depends="build">
<mkdir dir="${dist.dir}"/>
<copy includeemptydirs="false" todir="${dist.dir}">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</copy>
<jar destfile="${dist.dir}/dist.jar">
<fileset dir="${build.dir}" excludes="**/Test.class"/>
<manifest>
<attribute name="Main-Class" value="ingenious.suite.ProxyTurnTester" />
<attribute name="Class-Path"
value=". xstream-1.3.1.jar xpp3_min-1.1.4c.jar
junit-4.8.2.jar cofoja.jar asm-all-3.3.1.jar" />
</manifest>
</jar>
</target>
<target name="server" depends="build">
<copy includeemptydirs="false" todir="${dist.dir}">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</copy>
<jar destfile="${dist.dir}/server.jar">
<fileset dir="${build.dir}" excludes="**/Test.class"/>
<manifest>
<attribute name="Main-Class" value="ingenious.distributed.Server" />
<attribute name="Class-Path"
value=". xstream-1.3.1.jar xpp3_min-1.1.4c.jar
junit-4.8.2.jar cofoja.jar asm-all-3.3.1.jar" />
</manifest>
</jar>
</target>
<target name="client" depends="build">
<copy includeemptydirs="false" todir="${dist.dir}">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</copy>
<jar destfile="${dist.dir}/client.jar">
<fileset dir="${build.dir}" excludes="**/Test.class"/>
<manifest>
<attribute name="Main-Class" value="ingenious.distributed.Client" />
<attribute name="Class-Path"
value=". xstream-1.3.1.jar xpp3_min-1.1.4c.jar
junit-4.8.2.jar cofoja.jar asm-all-3.3.1.jar" />
</manifest>
</jar>
</target>
<target name="build" depends="init">
<javac srcdir="${build.dir}" destdir="${build.dir}"
includeantruntime="false"
source="${source}" target="${target}">
<classpath refid="classpath" />
</javac>
</target>
<target name="unit-test" depends="build">
<mkdir dir="${junit.output.dir}"/>
<junit fork="yes" printsummary="on">
<jvmarg value="-javaagent:${cofoja-jar}" />
<jvmarg value="-Dcom.google.java.contract.configurator=com.google.java.contract.tests.Cofoja" />
<formatter type="plain" usefile="false" />
<batchtest fork="yes" todir="${junit.output.dir}" haltonerror="yes" haltonfailure="yes">
<fileset dir="${build.dir}">
<include name="**/*Test.java"/>
<include name="**/Test*.java"/>
</fileset>
</batchtest>
<classpath refid="classpath"/>
</junit>
</target>
</project>