-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
121 lines (107 loc) · 4.19 KB
/
build.xml
File metadata and controls
121 lines (107 loc) · 4.19 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<project name="cloudflow" xmlns:ivy="antlib:org.apache.ivy.ant" default="all" basedir=".">
<description>
A simple Java in-process workflow intended to be used by distributed and virtualized workers.
</description>
<property name="version" value="2013.05"/>
<property name="dir.dest" value="build"/>
<property name="dir.doc" value="javadoc"/>
<property name="dir.src" value="src"/>
<property name="dir.lib" value="lib"/>
<property name="dir.dist" value="dist"/>
<property name="test.src" value="test"/>
<property name="test.dest" value="test-build"/>
<property name="test.out" value="test-out"/>
<property name="covr.dest" value="covr-build"/>
<property name="covr.out" value="covr-out"/>
<property name="ivy.install.version" value="2.3.0-rc2" />
<condition property="ivy.home" value="${env.IVY_HOME}">
<isset property="env.IVY_HOME" />
</condition>
<property name="ivy.home" value="${user.home}/.ant" />
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
<target name="init-ivy">
<mkdir dir="${ivy.jar.dir}"/>
<get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.file}" usetimestamp="true"/>
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
<target name="pre" depends="init-ivy">
<ivy:retrieve pathid="ivy.path"/>
</target>
<target name="compile" depends="pre">
<mkdir dir="${dir.dest}"/>
<javac srcdir="${dir.src}" destdir="${dir.dest}" debug="true"
classpathref="ivy.path" includeantruntime="false"/>
</target>
<target name="javadoc">
<mkdir dir="${dir.doc}"/>
<javadoc packagenames="com.hexagrammatic.cloudflow.*"
sourcepath="${dir.src}"
classpathref="ivy.path"
defaultexcludes="yes"
destdir="${dir.doc}"
author="true"
version="true"
use="true"
windowtitle="Cloudflow">
<doctitle><![CDATA[<h1>Cloudflow</h1>]]></doctitle>
<bottom><![CDATA[
<i>Copyright © 2012-
Bill Dimmick ([email protected]) and hexagrammatic.com
under the Apache License, Version 2.0</i>]]></bottom>
</javadoc>
</target>
<target name="jar">
<mkdir dir="${dir.dist}"/>
<jar destfile="${dir.dist}/${ant.project.name}-${version}.jar" basedir="${dir.dest}"/>
<jar destfile="${dir.dist}/${ant.project.name}-${version}-src.jar" basedir="${dir.dest}"/>
</target>
<target name="test" depends="compile">
<taskdef classpathref="ivy.path" resource="tasks.properties"/>
<delete file="cobertura.ser"/>
<mkdir dir="${test.dest}"/>
<mkdir dir="${test.out}"/>
<mkdir dir="${covr.out}"/>
<javac srcdir="${test.src}" destdir="${test.dest}" includeantruntime="false">
<classpath>
<pathelement path="${dir.dest}"/>
<path refid="ivy.path"/>
</classpath>
</javac>
<cobertura-instrument todir="${covr.dest}">
<includeClasses regex=".*"/>
<instrumentationClasspath>
<pathelement location="${dir.dest}"/>
</instrumentationClasspath>
</cobertura-instrument>
<junit fork="yes" printsummary="yes" haltonfailure="yes">
<sysproperty key="net.sourceforge.cobertura.datafile" file="cobertura.ser"/>
<classpath>
<pathelement path="${covr.dest}"/>
<pathelement path="${test.dest}"/>
<path refid="ivy.path"/>
</classpath>
<formatter type="plain"/>
<test name="com.hexagrammatic.cloudflow.AllTests" todir="${test.out}" haltonfailure="no" outfile="result">
<formatter type="xml"/>
</test>
</junit>
<cobertura-report format="html" destdir="${covr.out}" srcdir="${dir.src}" />
</target>
<target name="clean">
<delete dir="${dir.dest}"/>
<delete dir="${dir.doc}"/>
<delete dir="${dir.dist}"/>
<delete dir="${test.dest}"/>
<delete dir="${test.out}"/>
<delete dir="${covr.dest}"/>
<delete dir="${covr.out}"/>
<delete file="cobertura.ser"/>
</target>
<target name="all" depends="compile, test, javadoc, jar"/>
</project>