-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
78 lines (64 loc) · 2.47 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
<?xml version = "1.0"?>
<project name="Biblioteca" default="run" basedir=".">
<property name = "project.name" value="Biblioteca" />
<property name = "main.name" value="MainApplication" />
<property name = "package.name" value="com.tw.libsystem" />
<property name="clover.jar" location="lib/clover.jar"/>
<taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
<target name="with.clover">
<clover-setup/>
</target>
<target name="clover.html">
<clover-html-report outdir="coverage"/>
</target>
<target name="clover.xml">
<clover-report>
<current outfile="coverage.xml">
<format type="xml"/>
</current>
</clover-report>
</target>
<target name="build" depends="clean">
<mkdir dir="out"/>
<javac destdir="out">
<src path="src;test"/>
<classpath location="./lib/junit-4.12.jar"/>
<classpath location="./lib/mockito-all-1.9.5.jar"/>
<classpath location="./lib/system-rules-1.12.0.jar"/>
</javac>
</target>
<target name="clean" description="clean previous output directory">
<delete dir="out"/>
<delete file="lib/Biblioteca.jar"/>
</target>
<target name="build-jar" depends="build">
<jar destfile="lib/${project.name}.jar"
basedir="out"
excludes="**/Test.class">
</jar>
</target>
<target name="makeJar" depends="build-jar">
<java fork="true" failonerror="yes" classname="${package.name}.${main.name}">
<classpath>
<path location="lib/${project.name}.jar"/>
</classpath>
</java>
</target>
<target name="run" depends="build" description="runs the junit test cases">
<junit printsummary="yes" haltonfailure="true" showoutput="true">
<classpath>
<pathelement location="./lib/junit-4.12.jar"/>
<pathelement location="./lib/hamcrest-core-1.3.jar"/>
<pathelement location="./lib/mockito-all-1.9.5.jar"/>
<pathelement location="./lib/system-rules-1.12.0.jar"/>
<pathelement path="${clover.jar}"/>
<pathelement location="out"/>
</classpath>
<batchtest fork="yes">
<fileset dir="test">
<include name = "**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
</target>
</project>