Created
June 8, 2011 14:50
-
-
Save butlermh/1014571 to your computer and use it in GitHub Desktop.
Using uptodate to speed up builds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target name="check.retrieve.necessary" description="Only retrieve jars with Ivy if necessary"> | |
<ivy:resolve file="${ivy.file}" transitive="true"/> | |
<uptodate property="libs.uptodate"> | |
<srcfiles dir="." includes="${ivy.file}"/> | |
<mapper type="merge" to="{lib.dir}/.done"/> | |
</uptodate> | |
</target> | |
<target name="resolve" depends="check.retrieve.necessary" description="--> resolve and retrieve dependencies with ivy" | |
unless="libs.uptodate"> | |
<delete includeemptydirs="true" dir="${lib.dir}"/> | |
<mkdir dir="${job.lib.dir}"/> <!-- not usually necessary, ivy creates the directory IF there are dependencies --> | |
<mkdir dir="${test.lib.dir}"/> | |
<ivy:retrieve pattern="${job.lib.dir}/[artifact]-[revision].[ext]" conf="job" /> | |
<ivy:retrieve pattern="${test.lib.dir}/[artifact]-[revision].[ext]" conf="test" /> | |
<touch file="${lib.dir}/.done" /> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment