Skeleton project for building Java using Ant and Ivy
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

build-ivy.xml 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="ivy-util" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
  3. <description>Ivy utilities</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="ivy.classpath">
  11. <fileset dir="${ivy.search.path}/" includes="*.jar"/>
  12. <fileset dir="lib" includes="*.jar"/>
  13. </path>
  14. <available classname="org.apache.ivy.ant.IvyConfigure"
  15. property="ivy.available" classpathref="ivy.classpath" />
  16. </target>
  17. <target name="-download-ivy" depends="-init-ivy" unless="ivy.available">
  18. <echo message="Retrieving Ivy"/>
  19. <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
  20. dest="lib/ivy-${ivy.install.version}.jar"/>
  21. </target>
  22. <target name="-init-dependencies" depends="-download-ivy" unless="ivy.done">
  23. <!-- Regenerate the classpath as we may have just downloaded Ivy -->
  24. <path id="ivy.classpath">
  25. <fileset dir="${ivy.search.path}/" includes="*.jar"/>
  26. <fileset dir="lib" includes="*.jar"/>
  27. </path>
  28. <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.classpath"/>
  29. <ivy:settings file="etc/ivy/ivysettings.xml"/>
  30. <ivy:retrieve symlink="true" pattern="lib/[artifact]-[revision].[ext]" />
  31. <property name="ivy.done" value="true"/>
  32. </target>
  33. </project>