You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by "Sillence, Martin (GE Oil & Gas)" <Ma...@ge.com> on 2012/10/04 18:00:08 UTC

RE: Getting snapshots only from the snapshot repo - resolved

> We are having a performance issue with ivy we are trying to download
the
> latest snapshots either from a local repo (not the ivy cache) or from
a remote
> repo We also have an extensive list of fixed release libraries we link
to What
> I'd like to do is:
> 1/ for snapshots: search two locations for the latest file - local
repo/remote
> repo 2/ for release: just use any version - ivy cache/remote repo

Well having spent a few days looking for the answer to no avail and
finally asking the question the next think I look at appears to answer
my question...

I stumbled on the <modules> section of the documentation which I'd not
seen before

So I now have:


    <resolvers>
...
		<chain name="resolver.snapshot" checkmodified="true"
changingPattern=".*SNAPSHOT" returnFirst="false" latest="latest-time">
				<resolver ref="local.cache"/>
				<ibiblio name="snapshot"
m2compatible="true" usepoms="false" root="${snapshot.url}"
	
pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[clas
sifier]).[ext]"/>
		</chain>
		
		<ibiblio name="resolver.release" m2compatible="true"
root="${release.url}"
	
pattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
/>
    </resolvers>

	<modules>
		<module revision=".*SNAPSHOT.*" matcher="regexp"
resolver="resolver.snapshot"/>
		<!-- regex for not snapshot using lookahead see
http://stackoverflow.com/questions/406230/regular-expression-to-match-st
ring-not-containing-a-word -->
		<module revision="^((?!SNAPSHOT).)*$" matcher="regexp"
resolver="resolver.release"/> 
	</modules>

At first glance it seems to be doing the right thing and be _much_
quicker

Sorry for asking when being so close to the answer, hopefully it will
help others,
M