Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <!-- Heavily inspired by the examples on the Ivy web site -->
- <project xmlns:ivy="antlib:org.apache.ivy.ant" name="webprojectstart" default="go">
- <property name="ivy.install.version" value="2.0.0-rc2"/>
- <property name="ivy.jar.dir" value="${user.home}/.ivy2/jar"/>
- <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
- <target name="ivy-download-jar">
- <mkdir dir="${ivy.jar.dir}"/>
- <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" dest="${ivy.jar.file}" usetimestamp="true"/>
- <!-- TODO: Do <ivy:cleancache /> if <get...> downloaded file. But I don't know how to see if <get...> downloaded file. -->
- </target>
- <target name="ivy-use" depends="ivy-download-jar" description="">
- <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-resolve-dependencies" depends="ivy-use" description="">
- <ivy:retrieve sync="true"/>
- </target>
- <target name="go" depends="ivy-resolve-dependencies" description="">
- <echo>
- I'm in you build file! Can I haz build?
- </echo>
- </target>
- <target name="ivy-clean-jar" description="">
- <delete dir="${ivy.jar.dir}"/>
- </target>
- <target name="ivy-clean-cache" depends="ivy-use" description="">
- <ivy:cleancache/>
- </target>
- </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement