[
http://issues.apache.org/jira/browse/IVY-354?page=comments#action_12457948 ]
John Williams commented on IVY-354:
-----------------------------------
What I meant was caching between runs of Ant, not within a single run.
I have my group's builds set up now so that <ivy:resolve> is run for each
build, but this adds 2+ seconds and a page of output to every build, and my
coworkers are complaining to me about that. The only other reasonably simple
alternative seems to be to run <ivy:retrieve> to copy the dependencies into a
directory; this avoids the overhead of running Ivy so often, but it's not
workable in my case for the reasons I mentioned in IVY-353.
Implementing IVY-353 would solve my particular problem, but I posted this issue
because it seems to me that running <ivy:retrieve> is essentially a way to
cache the result of running Ivy, and it would be better to just cache Ivy's
data structures directly, probably in a form similar to a published ivy.xml
file with all recursive dependencies expanded. That way all of the
post-resolve tasks would be available during any part of the build.
<project . . . >
<target name="init">
<!-- Load resolve cache if it is present and newer than the ivy.xml,
otherwise do normal resolve and save the cache file. -->
<ivy:resolve . . . cacheFile="ivy-resolved.xml"/>
<!-- Build some classpaths based on the resolve. -->
<ivy:cachepath . . . >
<ivy:cachepath . . . >
<ivy:cachepath . . . >
</target>
<target name="clean-resolve">
<!-- delete the resolve cache to force a re-resolve next time -->
<delete file="ivy-resolved.xml"/>
</target>
. . . <!-- other targets --> . . .
</project>
> add option to cache results of ivy:resolve
> ------------------------------------------
>
> Key: IVY-354
> URL: http://issues.apache.org/jira/browse/IVY-354
> Project: Ivy
> Issue Type: Wish
> Components: Core
> Affects Versions: 1.4.1
> Environment: all
> Reporter: John Williams
>
> Using ivy:cachepath is a nice alternative to ivy:retrieve, but doing a
> resolve on every build is too slow. If there were some way to cache the
> result of resolving it would make cachepath much more pleasant to use.
> I've been experimenting with a poor man's version of this by saving the
> classpaths in a properties file to avoid needing to use Ivy so much, but this
> solution seems clumsy because it requires many steps.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira