Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

kent

By: a guest on Jan 10th, 2009  |  syntax: XML  |  size: 1.51 KB  |  views: 319  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?xml version="1.0"?>
  2. <!-- Heavily inspired by the examples on the Ivy web site -->
  3. <project xmlns:ivy="antlib:org.apache.ivy.ant" name="webprojectstart" default="go">
  4.   <property name="ivy.install.version" value="2.0.0-rc2"/>
  5.   <property name="ivy.jar.dir" value="${user.home}/.ivy2/jar"/>
  6.   <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
  7.   <target name="ivy-download-jar">
  8.     <mkdir dir="${ivy.jar.dir}"/>
  9.     <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"/>
  10.     <!-- TODO: Do <ivy:cleancache /> if <get...> downloaded file. But I don't know how to see if <get...> downloaded file. -->
  11.   </target>
  12.   <target name="ivy-use" depends="ivy-download-jar" description="">
  13.     <path id="ivy.lib.path">
  14.       <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
  15.     </path>
  16.     <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
  17.   </target>
  18.   <target name="ivy-resolve-dependencies" depends="ivy-use" description="">
  19.     <ivy:retrieve sync="true"/>
  20.   </target>
  21.   <target name="go" depends="ivy-resolve-dependencies" description="">
  22.     <echo>
  23.                 I'm in you build file! Can I haz build?
  24.         </echo>
  25.   </target>
  26.   <target name="ivy-clean-jar" description="">
  27.     <delete dir="${ivy.jar.dir}"/>
  28.   </target>
  29.   <target name="ivy-clean-cache" depends="ivy-use" description="">
  30.     <ivy:cleancache/>
  31.   </target>
  32. </project>