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