Skip to content

Commit 717e73c

Browse files
committed
Merge pull request #1 from sankargorthi/master
Adds the missing install-ivy build script
2 parents ff7a416 + 46f54a4 commit 717e73c

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
out/
33
*.ipr
44
*.iws
5+
classpath.txt
56
version.properties
7+
.project
8+
.classpath
69
lib/*
7-
build/*
10+
build/*
11+
generated-files/*

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ You need the following installed and available in your $PATH:
1414

1515
<li>- Apache ant 1.7 or greater (http://ant.apache.org/)
1616

17+
<li>- Scala 2.x or greater (http://www.scala-lang.org/downloads)
18+
1719
### To build the codegen library
1820
If you don't have the Apache Ivy dependency manager installed, run this build script:
1921

install-ivy

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<project name="install-ivy" xmlns:ivy="antlib:org.apache.ivy.ant" default="init-ivy" basedir=".">
2+
<property name="ivy.install.version" value="2.1.0-rc2" />
3+
<condition property="ivy.home" value="${env.IVY_HOME}">
4+
<isset property="env.IVY_HOME" />
5+
</condition>
6+
<property name="ivy.home" value="${user.home}/.ant" />
7+
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
8+
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
9+
10+
<target name="download-ivy" unless="offline">
11+
12+
<mkdir dir="${ivy.jar.dir}"/>
13+
<!-- download Ivy from web site so that it can be used even without any special installation -->
14+
<get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
15+
dest="${ivy.jar.file}" usetimestamp="true"/>
16+
</target>
17+
18+
<target name="init-ivy" depends="download-ivy">
19+
<!-- try to load ivy here from ivy home, in case the user has not already dropped
20+
it into ant's lib dir (note that the latter copy will always take precedence).
21+
We will not fail as long as local lib dir exists (it may be empty) and
22+
ivy is in at least one of ant's lib dir or the local lib dir. -->
23+
<path id="ivy.lib.path">
24+
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
25+
26+
</path>
27+
<taskdef resource="org/apache/ivy/ant/antlib.xml"
28+
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
29+
</target>
30+
</project>

0 commit comments

Comments
 (0)