-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-common.xml
101 lines (84 loc) · 2.42 KB
/
build-common.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
<?xml version="1.0"?>
<project name="build-common" xmlns:antelope="antlib:ise.antelope.tasks">
<property name="project.dir" value=".." />
<property environment="env" />
<property file="${project.dir}/build.iocl.properties" />
<path id="lib.classpath">
<fileset dir="${project.dir}/lib" includes="*.jar" />
</path>
<path id="project.classpath">
<pathelement path="${classpath}" />
<path refid="lib.classpath" />
</path>
<target name="clean">
<delete dir="classes" />
<delete dir="test-classes" />
<delete dir="test-results" />
<delete file="${jar.file}.jar" failonerror="false" />
</target>
<target name="compile">
<mkdir dir="classes" />
<copy todir="classes">
<fileset dir="src" excludes="**/*.java" />
</copy>
<javac
classpathref="project.classpath"
compiler="${javac.compiler}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
destdir="classes"
encoding="${javac.encoding}"
fork="${javac.fork}"
includeAntRuntime="false"
memoryMaximumSize="${javac.memoryMaximumSize}"
nowarn="${javac.nowarn}"
srcdir="src"
/>
</target>
<target name="compile-test">
<mkdir dir="test-classes" />
<mkdir dir="test-results" />
<copy todir="test-classes">
<fileset dir="test" includes="**/*.png,**/*.properties,**/*.xml" />
</copy>
<javac
classpathref="project.classpath"
compiler="${javac.compiler}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
destdir="test-classes"
encoding="${javac.encoding}"
includeAntRuntime="false"
nowarn="${javac.nowarn}"
srcdir="test"
/>
</target>
<target name="jar" depends="compile">
<jar
basedir="classes"
jarfile="${jar.file}.jar"
/>
</target>
<target name="test">
<delete dir="test-classes" />
<delete dir="test-results" />
<antcall target="compile" />
<antcall target="compile-test" />
<junit dir="${project.dir}" fork="on" forkmode="once" printsummary="on">
<jvmarg value="-Xmx256m" />
<jvmarg value="-Duser.timezone=GMT" />
<classpath refid="project.classpath" />
<formatter type="brief" usefile="false" />
<formatter type="xml" />
<batchtest todir="test-results">
<fileset dir="test-classes" includes="**/*Test.class" />
</batchtest>
</junit>
<junitreport todir="test-results">
<fileset dir="test-results">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="test-results"/>
</junitreport>
</target>
</project>