ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Dockter <>
Subject Re: How to retrieve updated snapshot builds from a Maven repo?
Date Sun, 11 Jan 2009 10:37:48 GMT

On Jan 9, 2009, at 4:31 PM, Les Hazlewood wrote:

> Hi all,
> I noticed that this same question was posted a few days ago
> (, but no one responded
> to it.  I'm hoping to bump this up as I really need this functionality
> as well.
> I'm seeing the same problems as Allan:
> I have Project A that builds and publishes its artifacts to a Maven
> repo (Nexus to be exact).  Project B, built by Ant+Ivy, requires
> projectA-revision-SNAPSHOT.jar in order to function correctly.  We're
> using Continuous Integration builds and we must ensure that Project B
> always builds based on the latest push of Project A's jar to ensure
> consistent API usage.
> However, Project B's ant+ivy build is NOT pulling the latest project A
> -SNAPSHOT .jar after it changes in the Nexus repository.  My config is
> practically identical to the one Allan posted in his thread.
> Can someone please definitively answer how to accomplish this?  I've
> done what is required according to the end-user documentation and
> Allan's thread, but it isn't working.
> A simple 'no, this doesn't work in Ivy yet' would suffice as well.
> I'd just like to know why I (and Allan) and I'm assuming other people
> can't get this to work :/

Fortunately it does work with Ivy. But AFAICT you _have_ to use the  
IBiblioResolver. Maven snapshots need special treatment. The normal  
Ivy 'changing' mechanism can't be applied here, as in the remote  
repository there are only more and more new timestamped versions of  
the artifact. There is no artifact changing, with a revision called  
'SNAPSHOT'. Only the IBiblioResolver knows how to deal with this.

- Hans

> Thanks!
> Les
> P.S.  Here is the relevant Ivy config (changed to match what Allan  
> had):
> <ivysettings>
>    <resolvers>
>        <url name="snapshots" m2compatible="true" changingPattern=".*- 
>            <artifact
> pattern="${artifact.repository.url}/snapshots/[organisation]/ 
> [module]/[revision]/[artifact]-[revision].[ext]"/>
>        </url>
>    </resolvers>
> </ivysettings>
> where artifact.repository.url equals
> http://someHost:8080/nexus/content/repositories

Hans Dockter
Gradle Project lead

View raw message