1 |
<project name="CircuiBreaker" default="jar"> |
2 |
|
3 |
<property name="builddir" value="antbuild" /> |
4 |
<property name="jarfile" value="CircuitBreaker.jar" /> |
5 |
|
6 |
<path id="path.base"> |
7 |
<fileset dir="/home/app/glassfishv3/glassfish/modules/"> |
8 |
<include name="*.jar" /> |
9 |
</fileset> |
10 |
<fileset dir="../"> |
11 |
<include name="*.jar" /> |
12 |
</fileset> |
13 |
</path> |
14 |
|
15 |
<target name="clean"> |
16 |
<delete file="${jarfile}" /> |
17 |
<delete dir="${builddir}" /> |
18 |
</target> |
19 |
|
20 |
<target name="init"> |
21 |
<mkdir dir="${builddir}" /> |
22 |
</target> |
23 |
|
24 |
<target name="compile" depends="init"> |
25 |
<javac srcdir="src/" destdir="${builddir}" debug="off" optimize="on" includeantruntime="false" updatedProperty="didcompile"> |
26 |
<classpath refid="path.base" /> |
27 |
</javac> |
28 |
</target> |
29 |
|
30 |
|
31 |
<target name="test" depends="compile" if="didcompile"> |
32 |
<javac srcdir="test/" includeantruntime="false"> |
33 |
<classpath refid="path.base" /> |
34 |
<classpath path="${builddir}"/> |
35 |
</javac> |
36 |
|
37 |
<junit printsummary="on" |
38 |
fork="false" |
39 |
haltonfailure="true" |
40 |
showoutput="true" > |
41 |
|
42 |
<classpath refid="path.base" /> |
43 |
<classpath path="${builddir}"/> |
44 |
<classpath path="test"/> |
45 |
|
46 |
<test name="dk.thoerup.circuitbreaker.TestCircuitBreaker" /> |
47 |
<test name="dk.thoerup.circuitbreaker.TestAccountingCircuitBreaker" /> |
48 |
|
49 |
</junit> |
50 |
</target> |
51 |
|
52 |
<target name="jar" depends="test"> |
53 |
<jar destfile="${jarfile}" basedir="${builddir}" /> |
54 |
</target> |
55 |
|
56 |
</project> |