|
@@ -0,0 +1,40 @@
|
|
1
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+<project name="ivy-util" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
|
|
3
|
+ <description>Ivy utilities</description>
|
|
4
|
+
|
|
5
|
+ <property name="ivy.install.version" value="2.2.0"/>
|
|
6
|
+ <property name="ivy.cache.ttl.default" value="7d"/>
|
|
7
|
+
|
|
8
|
+ <target name="-init-lib-directory">
|
|
9
|
+ <mkdir dir="lib"/>
|
|
10
|
+ </target>
|
|
11
|
+
|
|
12
|
+ <target name="-init-ivy" depends="-init-lib-directory">
|
|
13
|
+ <path id="ivy.classpath">
|
|
14
|
+ <fileset dir="${ivy.search.path}/" includes="*.jar"/>
|
|
15
|
+ <fileset dir="lib" includes="*.jar"/>
|
|
16
|
+ </path>
|
|
17
|
+
|
|
18
|
+ <available classname="org.apache.ivy.ant.IvyConfigure"
|
|
19
|
+ property="ivy.available" classpathref="ivy.classpath" />
|
|
20
|
+ </target>
|
|
21
|
+
|
|
22
|
+ <target name="-download-ivy" depends="-init-ivy" unless="ivy.available">
|
|
23
|
+ <echo message="Retrieving Ivy"/>
|
|
24
|
+ <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
|
|
25
|
+ dest="lib/ivy-${ivy.install.version}.jar"/>
|
|
26
|
+ </target>
|
|
27
|
+
|
|
28
|
+ <target name="-init-dependencies" depends="-download-ivy" unless="ivy.done">
|
|
29
|
+ <!-- Regenerate the classpath as we may have just downloaded Ivy -->
|
|
30
|
+ <path id="ivy.classpath">
|
|
31
|
+ <fileset dir="${ivy.search.path}/" includes="*.jar"/>
|
|
32
|
+ <fileset dir="lib" includes="*.jar"/>
|
|
33
|
+ </path>
|
|
34
|
+
|
|
35
|
+ <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.classpath"/>
|
|
36
|
+ <ivy:settings file="etc/ivy/ivysettings.xml"/>
|
|
37
|
+ <ivy:retrieve symlink="true" pattern="lib/[artifact]-[revision].[ext]" />
|
|
38
|
+ <property name="ivy.done" value="true"/>
|
|
39
|
+ </target>
|
|
40
|
+</project>
|