-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
108 lines (99 loc) · 4.15 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="ogss.test.java" xmlns:jacoco="antlib:org.jacoco.ant">
<property environment="env"/>
<property name="junit.output.dir" value="junit"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.8"/>
<property name="source" value="1.8"/>
<property name="testdir" value="${user.dir}"/>
<path id="skillJavaTestsuite.classpath">
<pathelement location="bin"/>
<pathelement location="lib/ogss.common.java.jar"/>
<pathelement location="lib/ogss.common.jvm.jar"/>
<pathelement location="lib/junit-4.12.jar"/>
<pathelement location="lib/hamcrest-core-1.3.jar"/>
<pathelement location="lib/json-20160810.jar"/>
</path>
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
<classpath path="lib/jacocoant.jar"/>
</taskdef>
<target name="init">
<mkdir dir="bin"/>
<mkdir dir="bin-test"/>
</target>
<target name="clean">
<delete dir="bin"/>
<delete dir="bin-test"/>
<delete dir="${junit.output.dir}"/>
<delete file="java.tests.jar"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}" encoding="UTF-8">
<src path="src/main/java"/>
<classpath refid="skillJavaTestsuite.classpath"/>
<compilerarg value="-Xlint:all"/>
</javac>
</target>
<target depends="build" name="build-tests">
<javac debug="true" debuglevel="${debuglevel}" destdir="bin-test" includeantruntime="false" source="${source}" target="${target}" encoding="UTF-8">
<src path="src/test/java"/>
<classpath refid="skillJavaTestsuite.classpath"/>
<compilerarg value="-Xlint:all"/>
</javac>
<jar destfile="java.tests.jar"
basedir="bin-test"
includes=""
excludes="">
</jar>
</target>
<target depends="build-tests" name="test">
<mkdir dir="${junit.output.dir}"/>
<junit fork="yes" printsummary="withOutAndErr">
<jvmarg value="-Duser.dir=${testdir}"/>
<classpath>
<pathelement location="bin"/>
<pathelement location="bin-test"/>
<pathelement location="lib/ogss.common.java.jar"/>
<pathelement location="lib/ogss.common.jvm.jar"/>
<pathelement location="lib/junit-4.12.jar"/>
<pathelement location="lib/hamcrest-core-1.3.jar"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="${junit.output.dir}">
<fileset dir="bin-test" includes="**/*.class" excludes="common/**,de/**"/>
</batchtest>
</junit>
</target>
<target depends="build-tests" name="test-coverage">
<mkdir dir="${junit.output.dir}"/>
<jacoco:coverage destfile="junit/jacoco.exec">
<junit fork="yes" forkmode="once" printsummary="withOutAndErr">
<jvmarg value="-Duser.dir=${testdir}"/>
<classpath>
<pathelement location="bin"/>
<pathelement location="bin-test"/>
<pathelement location="lib/ogss.common.java.jar"/>
<pathelement location="lib/ogss.common.jvm.jar"/>
<pathelement location="lib/junit-4.12.jar"/>
<pathelement location="lib/hamcrest-core-1.3.jar"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="${junit.output.dir}">
<fileset dir="bin-test" includes="**/*.class" excludes="common/**,de/**"/>
</batchtest>
</junit>
</jacoco:coverage>
</target>
<target depends="test" name="junitreport">
<junitreport todir="${junit.output.dir}">
<fileset dir="${junit.output.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${junit.output.dir}"/>
</junitreport>
</target>
</project>