-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathivy-init.xml
32 lines (26 loc) · 1.46 KB
/
ivy-init.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="ivy-init" basedir=".">
<!-- Note, reads the properties of the main build file. -->
<property name="ivy.install.version" value="2.5.1"/>
<property name="ivy.jar.dir" value="${user.home}/.ivy2"/>
<property name="ivy.jar.file" value="ivy-${ivy.install.version}.jar"/>
<property name="ivy.jar.path" value="${ivy.jar.dir}/${ivy.jar.file}"/>
<_target name="ivy-installed">
<available file="${ivy.jar.path}" property="ivy.installed"/>
</_target>
<_target name="ivy-download" unless="ivy.installed">
<mkdir dir="${ivy.jar.dir}"/>
<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.path}" usetimestamp="true"/>
</_target>
<_target name="ivy-init" depends="ivy-download">
<!-- try to load ivy here from ivy home, in case the user has not already dropped
it into ant's lib dir (note that the latter copy will always take precedence).
We will not fail as long as local lib dir exists (it may be empty) and
ivy is in at least one of ant's lib dir or the local lib dir. -->
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="${ivy.jar.file}"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</_target>
</project>