forked from james75/SolrMongoImporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
90 lines (70 loc) · 2.92 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
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="solr-mongo-importer" default="build"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="antlib:org.apache.ivy.ant ">
<property name="version" value="1.1.0"/>
<property name="build.dir" value="build"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<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"/>
<path id="build.classpath">
<fileset dir=".">
<include name="lib/*.jar"/>
</fileset>
</path>
<path id="jars">
<fileset dir="lib" includes="**/*.jar"/>
</path>
<pathconvert property="mf.classpath" pathsep=" ">
<path refid="build.classpath"/>
<mapper>
<chainedmapper>
<flattenmapper/>
<globmapper from="*.jar" to="lib/*.jar"/>
</chainedmapper>
</mapper>
</pathconvert>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="resolve" description="Use ivy to resolve classpaths">
<ivy:resolve/>
<ivy:report todir='${build.dir}/ivy' graph='false' xml='false'/>
<ivy:cachepath pathid="compile.path" conf="compile"/>
</target>
<target name="init" depends="ivy-init, clean">
<mkdir dir="${build.dir}"/>
<mkdir dir="${jar.dir}"/>
<mkdir dir="${classes.dir}"/>
</target>
<target name="compile">
<ivy:retrieve/>
<javac srcdir="src" destdir="${classes.dir}" classpathref="jars" debug="on" includeantruntime="false"/>
<jar basedir="${classes.dir}" destfile="${jar.dir}/${ant.project.name}-${version}.jar"/>
</target>
<target name="build" depends="init, resolve, compile">
</target>
<target name="ivy-init" depends="ivy-install" unless="skip.ivy">
<ivy:settings file="ivy-settings.xml"/>
</target>
<target name="ivy-download" 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="ivy-install" depends="ivy-download">
<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="ivy-clean">
<ivy:cleancache/>
</target>
</project>