-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.xml
88 lines (74 loc) · 2.96 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
<project name="artigo-solid-medium" default="compile">
<description>artigo-solid-medium build file</description>
<property file="build.properties"/>
<target name="clean">
<delete dir="${build.dir}" />
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir}/${classes.dir}" />
<mkdir dir="${build.dir}/${classes.test.dir}" />
<mkdir dir="${build.dir}/${test.report.dir}"/>
</target>
<target name="copy-resources" depends="clean">
<copy todir="${build.dir}/${classes.dir}">
<fileset dir="${src.dir}">
<include name="*.xml"/>
</fileset>
</copy>
</target>
<path id="classpath-compile">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<path id="classpath-compile-test">
<path refid="classpath-compile"/>
<pathelement path="${build.dir}/${classes.dir}"/>
</path>
<path id="classpath-test">
<path refid="classpath-compile-test"/>
<pathelement path="${build.dir}/${classes.test.dir}"/>
</path>
<target name="compile" depends="copy-resources">
<javac destdir="${build.dir}/${classes.dir}" srcdir="${src.dir}" includeantruntime="false">
<classpath refid="classpath-compile" />
</javac>
</target>
<target name="compile-test" depends="compile">
<javac destdir="${build.dir}/${classes.test.dir}" srcdir="${test.dir}" includeantruntime="false">
<classpath refid="classpath-compile-test" />
</javac>
</target>
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
<classpath path="${lib.dir}/jacocoant.jar"/>
</taskdef>
<target name="test" depends="compile-test">
<jacoco:coverage destfile="${build.dir}/${test.report.dir}/jacoco.exec" xmlns:jacoco="antlib:org.jacoco.ant" exclclassloader="sun.reflect.DelegatingClassLoader:javassist.Loader">
<junit showoutput="true" printsummary="on" haltonfailure="yes" fork="true" forkmode="once">
<classpath location="${lib.dir}/junit.jar" />
<classpath location="${lib.dir}/hamcrest-1.3.0.jar"/>
<classpath location="${build.dir}/${test.report.dir}" />
<formatter type="plain"/>
<batchtest fork="true" todir="${build.dir}/${test.report.dir}">
<fileset dir="${test.dir}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
<classpath refid="classpath-test" />
</junit>
</jacoco:coverage>
<jacoco:report xmlns:jacoco="antlib:org.jacoco.ant">
<executiondata>
<file file="${build.dir}/${test.report.dir}/jacoco.exec" />
</executiondata>
<structure name="Jacoco">
<classfiles>
<fileset dir="${build.dir}/${test.report.dir}" />
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${build.dir}/${test.report.dir}" />
</sourcefiles>
</structure>
<html destdir="${build.dir}/${test.report.dir}/report" />
</jacoco:report>
</target>
</project>