Skip to content

Instantly share code, notes, and snippets.

@stepancheg
Created December 17, 2009 00:17
Show Gist options
  • Save stepancheg/258367 to your computer and use it in GitHub Desktop.
Save stepancheg/258367 to your computer and use it in GitHub Desktop.
<target name="getjar-helper2" unless="skip.download">
<echo>Getting ${url} to ${file}</echo>
</target>
<target name="getjar-helper">
<available property="skip.download" file="${file}"/>
<antcall target="getjar-helper2"/>
</target>
<macrodef name="getjar">
<attribute name="name"/>
<attribute name="rev"/>
<sequential>
<antcall target="getjar-helper" inheritAll="false">
<param name="url" value="http://server/@{name}-@{rev}.jar"/>
<param name="file" value="lib/@{name}-@{rev}.jar"/>
</antcall>
</sequential>
</macrodef>
<target name="get-deps">
<getjar name="aaa" rev="11"/>
<getjar name="bbb" rev="12"/>
<getjar name="ccc" rev="13"/>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment