ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Les Hazlewood" <>
Subject Re: How to retrieve updated snapshot builds from a Maven repo?
Date Mon, 12 Jan 2009 18:32:02 GMT
Hi Hans,

Thank you so much for your guidance.  We finally got it working, but albeit
after fighting for a few hours.  I hope this email saves other people some
time.  Here is what we did:

I changed my snapshots resolver to use the ibiblio one instead of the url
one directly.  Here is what that looks like now, in working state:

<ibiblio name="snapshots" m2compatible="true"

However, that by itself wasn't working.  I was fighting for a couple hours,
trying to add attributes to it like changingPattern=".*-SNAPSHOT" and
checkmodified="true" and all sorts of combinations of these on the resolver,
on the parent chain, and more.  This took a long time because in between
each change to my resolver/chain config, I triggered a new build on the
snapshot artifact to ensure it was uploaded to the artifact repository.
Then I'd test out my other project's ivy build after each trigger.  Very
time consuming :/

It turns out I didn't need to do any of that, but instead, we had to add
this the changing="true" attribute to our dependency statement in ivy.xml:

<dependency org="com.mycompany" name="aProject" rev="1.0.0-SNAPSHOT"
conf="someConf,anotherConf" *changing="true"*/>

I'm extremely grateful for your guidance, although I must say, I was rather
frustrated by this solution given the amount of time I wasted on trying
things on configuring the resolver:

If I specify that my snapshots resolver had a changingPattern, why would i
need to also add changing="true" to the ivy.xml file dependency statement?
It should know that automatically just by the nature that I'm using a
resolver with a changingPattern.

That is, the very notion of a changingPattern means that the dependency
could change.  Why must I also specify that in ivy.xml?  Seems unnecessarily
redundant to me.  Should I file a Jira issue?

Thanks again,


On Sun, Jan 11, 2009 at 6:16 AM, Hans Dockter <> wrote:
> On Jan 11, 2009, at 11:37 AM, Hans Dockter wrote:
>> 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.
>> is no artifact changing, with a revision called 'SNAPSHOT'. Only the
>> IBiblioResolver knows how to deal with this.
> BTW: The IBiblioResolver also parses the metadata.xml of the Maven
> folder, to figure out what to do.
> - Hans
>> - 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=".*-SNAPSHOT">
>>>          <artifact
>>>      </url>
>>>  </resolvers>
>>> </ivysettings>
>>> where artifact.repository.url equals
>>> http://someHost:8080/nexus/content/repositories
>> --
>> Hans Dockter
>> Gradle Project lead
> --
> Hans Dockter
> Gradle Project lead

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message