I've noticed there is like a 10 second hit using a groovy script with Grape annotations on my OSX box. Is it always this way? Can I make grape favor its cache (the depedencies are definitely already on the system in ~/.groovy/grapes...).
A:
Do you have a ~/.groovy/grapeConfig.xml file defined? The example given in the doco favours the local cache.
<ivysettings>
<settings defaultResolver="downloadGrapes"/>
<resolvers>
<chain name="downloadGrapes">
<filesystem name="cachedGrapes">
<ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
<artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
</filesystem>
<!-- todo add 'endorsed groovy extensions' resolver here -->
<ibiblio name="codehaus" root="http://repository.codehaus.org/" m2compatible="true"/>
<ibiblio name="ibiblio" m2compatible="true"/>
<ibiblio name="java.net2" root="http://download.java.net/maven/2/" m2compatible="true"/>
</chain>
</resolvers>
</ivysettings>
Mark O'Connor
2010-08-09 20:02:05
Yeah thats pretty much what my configuration looks like - except I have a few extra 'ibiblio' references for different repositories down at the bottom.
dsummersl
2010-08-10 19:40:15
In your groovy script have you declared a dependency on the latest version of a library? In this case Groovy might be checking the internet to determine if there's anything new to download.Finally you could set the property -Dgroovy.grape.autoDownload=false to tell Groovy not to download anything
Mark O'Connor
2010-08-14 11:39:36