-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.xml
executable file
·65 lines (57 loc) · 2.43 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
<project name="coherence-bootstrap" default="junit" basedir=".">
<property name="lib.dir" value="lib"/>
<property name="src.dir" location="src"/>
<property name="build.dir" location="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="build.config.dir" value="${build.dir}/config"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="reports.dir" value="reports"/>
<property name="config.dir" value="config"/>
<path id="application" location="${jar.dir}/${ant.project.name}.jar"/>
<path id="local" location="."/>
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<target name="init">
<tstamp/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${classes.dir}"/>
<mkdir dir="${build.config.dir}"/>
<mkdir dir="${reports.dir}"/>
</target>
<target name="compile" depends="clean, init">
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" includeantruntime="false" debug="on"/>
<copy todir="${classes.dir}/config">
<fileset dir="${config.dir}" excludes="**/*.java"/>
</copy>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${reports.dir}"/>
</target>
<target name="jar" depends="compile">
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}">
</jar>
</target>
<target name="test" depends="jar" >
<junit printsummary="withOutAndErr" fork="yes" showoutput="true" haltonfailure="true" logfailedtests="on" maxmemory="1g">
<jvmarg value="-XX:+UseParallelOldGC"/>
<jvmarg value="-javaagent:lib/SizeOf.jar"/>
<formatter type="plain" usefile="true"/>
<classpath>
<path refid="classpath"/>
<path refid="application"/>
<path refid="local"/>
</classpath>
<batchtest fork="yes" todir="${reports.dir}">
<fileset dir="${src.dir}" includes="**/basic/*.java"/>
<fileset dir="${src.dir}" includes="**/morecomplex/*.java"/>
</batchtest>
</junit>
<delete>
<fileset dir="." includes="junit*.properties"/>
<fileset dir="." includes="CLUSTER_DATA_LOSS_DETECTED"/>
</delete>
</target>
</project>