You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build-ivy.xml 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="DMDirc-ivy" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
  3. <description>Ivy utilities for DMDirc</description>
  4. <property name="ivy.install.version" value="2.2.0"/>
  5. <property name="ivy.cache.ttl.default" value="7d"/>
  6. <target name="-init-lib-directory">
  7. <mkdir dir="lib"/>
  8. </target>
  9. <target name="-init-ivy" depends="-init-lib-directory">
  10. <path id="lib.classpath">
  11. <fileset dir="lib" includes="*.jar"/>
  12. </path>
  13. <available classname="org.apache.ivy.ant.IvyConfigure"
  14. property="ivy.available" classpathref="lib.classpath" />
  15. </target>
  16. <target name="-download-ivy" depends="-init-ivy" unless="ivy.available">
  17. <echo message="Retrieving Ivy"/>
  18. <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
  19. dest="lib/ivy-${ivy.install.version}.jar"/>
  20. </target>
  21. <target name="-init-dependencies" depends="-download-ivy" unless="ivy.done">
  22. <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="lib.classpath"/>
  23. <ivy:settings file="etc/ivy/ivysettings.xml"/>
  24. <ivy:resolve file="ivy.common.xml" />
  25. <ivy:retrieve symlink="true" pattern="lib/[artifact]-[revision].[ext]" />
  26. <ivy:resolve file="ivy.irc.xml" />
  27. <ivy:retrieve symlink="true" pattern="lib/[artifact]-[revision].[ext]" />
  28. <pathconvert property="lib.classpath.computed" dirsep="/" pathsep=":">
  29. <path>
  30. <fileset dir="lib" includes="*.jar"/>
  31. </path>
  32. <map from="${basedir}${file.separator}" to=""/>
  33. </pathconvert>
  34. <touch mkdirs="true" file="nbproject/private/private.properties"/>
  35. <propertyfile file="nbproject/private/private.properties">
  36. <entry operation="=" key="lib.classpath" value="${lib.classpath.computed}"/>
  37. </propertyfile>
  38. <property name="ivy.done" value="true"/>
  39. </target>
  40. <target name="-post-clean">
  41. <delete dir="lib"/>
  42. </target>
  43. </project>