-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.xml
110 lines (97 loc) · 2.97 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
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
<project name="solr-git"
basedir="."
default="test"
xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="build-properties-file-name"
value="build.properties"/>
<property name="src.dir"
value="."/>
<property name="lib.dir"
value="lib"/>
<property name="conf.dir"
value="conf"/>
<mkdir dir="${lib.dir}"/>
<property name="build.dir"
value="build"/>
<property name="classes.dir"
value="${build.dir}/classes"/>
<property name="main-class"
value="Main"/>
<property name="ivy.install.version"
value="2.1.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="download-ivy"
unless="offline">
<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"/>
</target>
<target name="init-ivy"
depends="download-ivy">
<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="resolve"
description="Retrieve dependencies with Ivy"
depends="init-ivy">
<echo message="Resolving project dependencies"/>
<ivy:retrieve/>
</target>
<path id="lib-paths">
<fileset dir="${lib.dir}" includes="**/*.jar" excludes="*-sources.jar,*-javadoc.jar" />
<fileset dir="${conf.dir}" includes="**/*.properties"/>
</path>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="compile"
depends="resolve">
<mkdir dir="${classes.dir}"/>
<javac includeantruntime="false"
srcdir="${src.dir}"
destdir="${classes.dir}"
classpathref="lib-paths"/>
</target>
<target name="invoke"
depends="compile">
<java classname="${main-class}"
fork="true"
classpathref="lib-paths"
failonerror="true">
<classpath>
<pathelement location="${classes.dir}"/>
</classpath>
</java>
</target>
<target name="invoke-wf"
depends="compile">
<java classname="Workflow"
fork="true"
classpathref="lib-paths"
failonerror="true">
<classpath>
<pathelement location="${classes.dir}"/>
</classpath>
</java>
</target>
<target name="test"
depends="clean,compile"/>
<target name="run"
depends="clean,invoke"/>
<target name="wf"
depends="clean,invoke-wf"/>
</project>