forked from pH-7/Simple-Java-Calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
68 lines (65 loc) · 2.64 KB
/
build.xml
File metadata and controls
68 lines (65 loc) · 2.64 KB
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="junitreport" name="SimpleJavaCalculator">
<description>Builds, tests, and runs the project SimpleJavaCalculator.</description>
<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="build.dir" value="build"/>
<property name="src.dir" value="src"/>
<property name="test.dir" value="test"/>
<path id="JUnit 4.libraryclasspath">
<pathelement location="lib/junit.jar"/>
<pathelement location="lib/hamcrest-all-1.3.jar"/>
</path>
<path id="build.classpath">
<pathelement location="${build.dir}"/>
<path refid="JUnit 4.libraryclasspath"/>
</path>
<target name="init">
<mkdir dir="${build.dir}"/>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target depends="clean,delete" name="cleanall"/>
<target depends="init" name="build">
<javac debug="true" debuglevel="${debuglevel}" destdir="${build.dir}" includeantruntime="false" source="${source}" target="${target}">
<src path="${src.dir}"/>
<classpath refid="build.classpath"/>
</javac>
<javac debug="true" debuglevel="${debuglevel}" destdir="${build.dir}" includeantruntime="false" source="${source}" target="${target}">
<src path="${test.dir}"/>
<classpath refid="build.classpath"/>
</javac>
</target>
<target depends="build" name="test">
<mkdir dir="${junit.output.dir}"/>
<junit fork="yes" printsummary="withOutAndErr">
<formatter type="xml"/>
<batchtest fork="on" todir="${junit.output.dir}" haltonfailure="no">
<fileset dir="${build.dir}">
<include name="**/*Test.class"/>
</fileset>
</batchtest>
<classpath refid="build.classpath"/>
</junit>
</target>
<target name="run">
<java classname="simplejavacalculator.SimpleJavaCalculator" failonerror="true" fork="yes">
<classpath refid="build.classpath"/>
</java>
</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>
<target name="delete">
<delete dir="${junit.output.dir}"/>
</target>
</project>