On Dec 29, 2007 3:22 PM, hdockter <[EMAIL PROTECTED]> wrote: > > I'm not completely happy with the resolve speed of my dependencies. All my > artifacts and module descriptors are in the cache. Ivy finds the cached > module descriptor, but goes through my resolver chain until it finds the > corresponding module descriptor in one of the repositories. As these are > internet repositories quite often my build is even stalled because of > that. > > If I'm offline everythings works very fast. I'd love to have this offline > experience when I'm online :). This is my ivysettings.xml and a snippet of > the debug output of the build. Is there anything I can configure to avoid > the remote lookup?
After investigation on your log and Ivy code, it seems it's a trouble with Ivy and chain resolver usage. When IVY-207 has been fixed, a piece of code checking if the module in cache has been fetched by the current resolver checking the cache has been added. But this defeats the purpose of the cache, and should only be done when checkModified is set to true. Investigating in our issue database there's already an issue for that: IVY-389. It seems nobody has had time to fix it yet (despite a patch being provided, too bad :-( ), but I've just assigned the bug to me, I'll fix it soon. Xavier > > <ivysettings> > <property name="ibiblio-maven2-root" > value="http://repo1.maven.org/maven2/" override="false"/> > <property name="maven2.pattern" > > value="[organisation]/[module]/[revision]/[module]-[revision]"/> > <property name="maven2.pattern.ext" > value="${maven2.pattern}.[ext]"/> > > <!-- pull in the local repository --> > <include url="${ivy.default.conf.dir}/ivyconf-local.xml"/> > > <settings defaultResolver="default" checkUpToDate="false"/> > <resolvers> > <ibiblio name="maven2" > root="${ibiblio-maven2-root}" > pattern="${maven2.pattern.ext}" > m2compatible="true" > /> > <dual name="gradle" allownomd="false"> > <url name="sf_ivy"> > <ivy > pattern=" > http://cradle.sourceforge.net/repository/[organisation]/[module]/ivy-[revision].xml<http://cradle.sourceforge.net/repository/%5Borganisation%5D/%5Bmodule%5D/ivy-%5Brevision%5D.xml> > "/> > </url> > <url name="jar_maven2" m2compatible="true"> > <artifact > pattern="http://cradle.sourceforge.net/repository/${maven2.pattern.ext}<http://cradle.sourceforge.net/repository/$%7Bmaven2.pattern.ext%7D> > "/> > <artifact > pattern="${ibiblio-maven2-root}/${maven2.pattern.ext}"/> > </url> > </dual> > <chain name="default" returnFirst="true"> > <resolver ref="local"/> > <resolver ref="gradle"/> > <resolver ref="maven2"/> > </chain> > </resolvers> > </ivysettings> > > [ivy:cachepath] == resolving dependencies > org.gradle#gradle;[EMAIL PROTECTED]> > net.sourceforge.cobertura#cobertura;1.9 > [build->default] > [ivy:cachepath] loadData of net.sourceforge.cobertura#cobertura;1.9 of > rootConf=build > [ivy:cachepath] using default to resolve > net.sourceforge.cobertura#cobertura;1.9 > [ivy:cachepath] default: no latest strategy defined: using default > [ivy:cachepath] local: no namespace defined: using system > [ivy:cachepath] pre 1.3 ivy file: using exactOrRegexp as default matcher > [ivy:cachepath] found ivy file in cache for > net.sourceforge.cobertura#cobertura;1.9 (resolved by maven2): > /Users/hans/.ivy2/cache/net.sourceforge.cobertura/cobertura/ivy-1.9.xml > [ivy:cachepath] found module in cache but with a different resolver: > discarding: net.sourceforge.cobertura#cobertura;1.9; expected > resolver=local; resolver=maven2 > [ivy:cachepath] local: no latest strategy defined: using default > [ivy:cachepath] trying > > /Users/hans/.ivy2/local/net.sourceforge.cobertura/cobertura/1.9/ivys/ivy.xml > [ivy:cachepath] tried > > /Users/hans/.ivy2/local/net.sourceforge.cobertura/cobertura/1.9/ivys/ivy.xml > [ivy:cachepath] local: resource not reachable for > net.sourceforge.cobertura#cobertura;1.9: > > res=/Users/hans/.ivy2/local/net.sourceforge.cobertura/cobertura/1.9/ivys/ivy.xml > [ivy:cachepath] trying > > /Users/hans/.ivy2/local/net.sourceforge.cobertura/cobertura/1.9/jars/cobertura.jar > [ivy:cachepath] tried > > /Users/hans/.ivy2/local/net.sourceforge.cobertura/cobertura/1.9/jars/cobertura.jar > [ivy:cachepath] local: resource not reachable for > net.sourceforge.cobertura#cobertura;1.9: > > res=/Users/hans/.ivy2/local/net.sourceforge.cobertura/cobertura/1.9/jars/cobertura.jar > [ivy:cachepath] local: no ivy file nor artifact found for > net.sourceforge.cobertura#cobertura;1.9 > [ivy:cachepath] sf_ivy: no namespace defined: using system > [ivy:cachepath] pre 1.3 ivy file: using exactOrRegexp as default matcher > [ivy:cachepath] found ivy file in cache for > net.sourceforge.cobertura#cobertura;1.9 (resolved by maven2): > /Users/hans/.ivy2/cache/net.sourceforge.cobertura/cobertura/ivy-1.9.xml > [ivy:cachepath] found module in cache but with a different resolver: > discarding: net.sourceforge.cobertura#cobertura;1.9; expected > resolver=sf_ivy; resolver=maven2 > [ivy:cachepath] sf_ivy: no latest strategy defined: using default > [ivy:cachepath] trying > > http://cradle.sourceforge.net/repository/net.sourceforge.cobertura/cobertura/ivy-1.9.xml > [ivy:cachepath] tried > > http://cradle.sourceforge.net/repository/net.sourceforge.cobertura/cobertura/ivy-1.9.xml > [ivy:cachepath] CLIENT ERROR: Not Found > url= > http://cradle.sourceforge.net/repository/net.sourceforge.cobertura/cobertura/ivy-1.9.xml > [ivy:cachepath] HTTP response status: 404 > url= > http://cradle.sourceforge.net/repository/net.sourceforge.cobertura/cobertura/ivy-1.9.xml > [ivy:cachepath] sf_ivy: resource not reachable for > net.sourceforge.cobertura#cobertura;1.9: > res= > http://cradle.sourceforge.net/repository/net.sourceforge.cobertura/cobertura/ivy-1.9.xml > [ivy:cachepath] sf_ivy: no ivy file nor artifact found for > net.sourceforge.cobertura#cobertura;1.9 > [ivy:cachepath] maven2: no namespace defined: using system > [ivy:cachepath] pre 1.3 ivy file: using exactOrRegexp as default matcher > [ivy:cachepath] found ivy file in cache for > net.sourceforge.cobertura#cobertura;1.9 (resolved by maven2): > /Users/hans/.ivy2/cache/net.sourceforge.cobertura/cobertura/ivy-1.9.xml > [ivy:cachepath] maven2: revision in cache: > net.sourceforge.cobertura#cobertura;1.9 > [ivy:cachepath] found net.sourceforge.cobertura#cobertura;1.9 in > maven2 > > -- > View this message in context: > http://www.nabble.com/Unwanted-remote-lookup-of-%28cached%29-module-descriptor-tp14537954p14537954.html > Sent from the ivy-user mailing list archive at Nabble.com. > > -- Xavier Hanin - Independent Java Consultant http://xhab.blogspot.com/ http://ant.apache.org/ivy/ http://www.xoocode.org/
