forked from mcoriou/sweng-test-exam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
51 lines (44 loc) · 1.64 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
<project name="SwEngExam" default="compile" basedir=".">
<description>
Ant Build File for SwEngExam
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="bin"/>
<property name="test" location="src"/>
<path id="project.classpath">
<pathelement location="${build}" />
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<!-- Compile Project -->
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac debug="true" srcdir="${src}" destdir="${build}" classpathref="project.classpath" includeantruntime="false"/>
</target>
<!-- Run the tests -->
<target name="test" depends="compile" description="run the tests ">
<junit printsummary="yes" fork="yes" haltonfailure="no">
<formatter type="plain" usefile="false" />
<batchtest fork="true">
<fileset dir="${test}">
<include name="**/*Test*.java" />
</fileset>
</batchtest>
<classpath refid="project.classpath" />
</junit>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and directory trees -->
<delete dir="${build}"/>
</target>
</project>