<project name="ivy-projsetup" xmlns:ivy="antlib:org.apache.ivy.ant">
<!--
  Copyright (c) 2010, The HSQL Development Group. All rights reserved.
  Released under the HSQL license, available at http://hsqldb.org
-->

  <property environment="env"/>
  <property name="LIB_REPOS.default" value="${user.home}/lib-repos"/>
  <property name="RESO_CACHEDIR.default" value="${user.home}/.ivycache"/>
  <property name="repos.dirpath" value="${user.dir}/local/repos"/>

  <target name="-condl-setlr" if="env.LIB_REPOS">
    <property name="LIB_REPOS" value="${env.LIB_REPOS}"/>
  </target>
  <target name="-condl-setrcd" if="env.RESO_CACHEDIR">
    <property name="RESO_CACHEDIR" value="${env.RESO_CACHEDIR}"/>
  </target>

  <target name="-ivy-setup" depends="-condl-setlr, -condl-setrcd">
    <property name="LIB_REPOS" value="${LIB_REPOS.default}"/>
    <property name="RESO_CACHEDIR" value="${RESO_CACHEDIR.default}"/>
    <available property="_ivy.present" classname="org.apache.ivy.ant.IvyTask"/>
    <fail unless="_ivy.present">
Add Ivy jar file to Ant CLASSPATH.
Copy-and-paste this for any Bourne shell (inc. Bash):

  export ANT_ARGS; ANT_ARGS='-lib ${basedir}/../../build/ivy-2.2.0.jar -noclasspath'

OR copy-and-paste this for any CMD-like Windows shell:

  SET ANT_ARGS=-lib "${basedir}/../../build/ivy-2.2.0.jar" -noclasspath</fail>
  </target>
</project>
