ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Les Hazlewood" <lhazlew...@apache.org>
Subject Re: How to retrieve updated snapshot builds from a Maven repo?
Date Fri, 09 Jan 2009 15:47:21 GMT
I should also note that Project A is being published via Maven.
Project B is building via ant+ivy.  Could this be a problem?

According to the Ivy user documentation in the "Cache and Change
Management" section:

"So if you want to use changing revisions, use the publish task to
publish your modules, it will take care of updating the publication
date, and everything will work fine. And remember to set
checkModified=true" on your resolver too!"

Project A is not using any Ivy 'publish task'.  It publishes via Maven.

Does this mean in order for Ivy to retrieve snapshot builds that the
snapshot must be published by Ivy to being with?  That is, does Ivy
require reading an Ivy metadata XML file to determine change?  It
won't look at the maven-metadata.xml that is already there?

I would expect that, if a resolver has the attribute
m2compatible="true" that it would look at maven-metadata.xml
'lastUpdated' timestamp to determine if there was a change.  Is this
not the case?

Thanks,

Les

On Fri, Jan 9, 2009 at 10:31 AM, Les Hazlewood <lhazlewood@apache.org> wrote:
> Hi all,
>
> I noticed that this same question was posted a few days ago
> (http://markmail.org/message/qjdf2hyjepiuktch), 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 :/
>
> 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
> 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
>

Mime
View raw message