ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Pelisse <bela...@gmail.com>
Subject Re: Downloading new snapshot (trigger by timestamp)
Date Mon, 17 Jan 2011 09:36:40 GMT
Hi Marteen,

Well, It's not that I need them this way, I just need to have ivy download
my artefact. Any other syntax that will do the trick is fine by me. My
ivy.xml will contains this "list" of zipfiles to download so...

On 15 January 2011 00:14, Maarten Coene <maarten_coene@yahoo.com> wrote:

> After reading your other posts and looking at the Ivy code, I think it
> could be
> caused by the way you define the dependency:
>
> <dependency org="my.company" name="app1" rev="0.2.0-SNAPSHOT">
>   <artifact name="app1" type="zip"/>
> </dependency>
>
> I think Ivy will not redownload artifacts defined this way. I'm not 100%
> sure of
> it though, I didn't had the opportunity to test it out yet...
> Could you confirm you did indeed your dependencies like this?
>
> Maarten
>
>
>
>
> ----- Original Message ----
> From: Romain Pelisse <belaran@gmail.com>
> To: ivy-user@ant.apache.org
> Sent: Fri, January 14, 2011 6:38:58 PM
> Subject: Re: Downloading new snapshot (trigger by timestamp)
>
> After a careful reading of this part of documentation :
> http://ant.apache.org/ivy/history/latest-milestone/concept.html#change, I
> start to suspect what maybe my issue.
>
> As it is rather clearly describe (a tribute to Ivy documentation quality),
> an artifact with the same revision can be perceived as "new" by Ivy only if
> it meta data changes (ie it's pom.xml). However, in my case, if I do
> publish
> a new pom.xml this one is differently named than the .zip file. (Indeed, as
> I mention earlier on, I don't use Ivy to download jars but actually zip
> files - those zip files contained package applications).
>
> So I guess, it boils down to how Ivy consider as meta data and what do it
> actively checks ?
>
> I guess I could simply run Ivy in debug mode to learn that, but if one of
> you could help me (and spare this annoying task) I'll appreciate it greatly
> :)
>
> On 14 January 2011 18:12, Romain Pelisse <belaran@gmail.com> wrote:
>
> > I just added this to my command line : -Divy.cache.ttl.default=10s
> >
> > However, I'm still confused on how the cache will impact what I'm trying
> to
> > do. The way I understand, but I might be wrong, is that if the cache is
> > somehow expired or deleted, Ivy will simply download again all the
> > artefacts. Or I only need it to download jars where timestamp on the
> nexus
> > repository has changed. Am I missing something here on how Ivy caches
> things
> > ?
> >
> >
> > On 14 January 2011 17:54, Tim Brown <tpbrown@gmail.com> wrote:
> >
> >> Hmm... I'm surprised checkmodified=true isn't working.
> >>
> >> What's your cache TTL configured for?  By chance is it something >1
> hour?
> >>
> >>
> >> On Fri, Jan 14, 2011 at 8:49 AM, Romain Pelisse <belaran@gmail.com>
> >> wrote:
> >>
> >> > Yes, I did clean the cache. Just out of clarity here is how I'm
> testing
> >> it
> >> > :
> >> >
> >> > 1. delete cache: rm -rf /etc/ivy/cache/
> >> > 2. running the comand to download for the first time the jars :
> >> > /usr/bin/java -Divy.default.ivy.user.dir=/etc/ivy/ -jar
> >> > /usr/share/java/ivy.jar -settings /etc/ivy/ivy-settings.xml -ivy
> >> > /etc/ivy/ivy.xml
> >> > 3. I published again the jars (same jars, but timestamp change on the
> >> nexus
> >> > server)
> >> > 4. run commands again.
> >> >
> >> > I'm wondering if a new download would be trigger if the checksum of
> the
> >> jar
> >> > changed. Maybe I need to actually change something in the code for Ivy
> >> to
> >> > download it again ?
> >> >
> >> > ps2hekmat: nicely spotted ;) , I added the missing '.' but it does not
> >> > change current behavior.
> >> >
> >> > On 14 January 2011 17:38, Hekmat, Payam <phekmat@onenetwork.com>
> wrote:
> >> >
> >> > > I could be mistaken, but shouldn't the changingPattern be
> >> ".*-SNAPSHOT"
> >> > for
> >> > > a regexp matcher (or "*-SNAPSHOT" for glob)?
> >> > >
> >> > > -----Original Message-----
> >> > > From: Mitch Gitman [mailto:mgitman@gmail.com]
> >> > > Sent: Friday, January 14, 2011 10:36 AM
> >> > > To: ivy-user@ant.apache.org
> >> > > Subject: Re: Downloading new snapshot (trigger by timestamp)
> >> > >
> >> > > No, I mean clean the Ivy cache just this once so that the new
> settings
> >> > have
> >> > > an opportunity to be recognized.
> >> > >
> >> > > On Fri, Jan 14, 2011 at 8:33 AM, Romain Pelisse <belaran@gmail.com>
> >> > wrote:
> >> > >
> >> > > > Hi,
> >> > > >
> >> > > > Yes, but I would like to avoid cleaning the cache everytime.
This
> >> idea
> >> > is
> >> > > > that Ivy just checks if some of the content of the cache has
> >> actually
> >> > > > changed on the nexus repository. If I clean the cache everytime,
> >> I'll
> >> > end
> >> > > > up
> >> > > > download everything, everytime.
> >> > > >
> >> > > > I just tried adding  checkmodified="true" on my resolver :
> >> > > >
> >> > > > <url name="my-resolver"
> >> > > >      changingPattern="\*-SNAPSHOT"
> >> > > >      changingMatcher="regexp"
> >> > > >       checkmodified="true"
> >> > > >      m2compatible="true">
> >> > > >
> >> > > > But sadly, as you suspected, Ivy does not treats pom.xml like
> >> ivy.xml
> >> > in
> >> > > > this regards...
> >> > > >
> >> > > >
> >> > > > On 14 January 2011 17:21, Mitch Gitman <mgitman@gmail.com>
wrote:
> >> > > >
> >> > > > > First try clearing out your Ivy cache either with the
> >> ivy:cleancache
> >> > > task
> >> > > > > or
> >> > > > > manually, and then try again.
> >> > > > >
> >> > > > > One alternative is to specify checkmodified="true". That's
> >> presuming
> >> > > that
> >> > > > > every time you publish a new snapshot, you're publishing
the new
> >> pom
> >> > > with
> >> > > > > it. I'm assuming that checkmodified="true" treats a pom.xml
like
> >> an
> >> > > > > ivy.xml,
> >> > > > > but I don't know that for a fact.
> >> > > > >
> >> > > > > On Fri, Jan 14, 2011 at 7:47 AM, Romain Pelisse <
> >> belaran@gmail.com>
> >> > > > wrote:
> >> > > > >
> >> > > > > > Hi Mitch,
> >> > > > > >
> >> > > > > > Thanks for your reply, I quickly tried it, but it does
not
> seems
> >> to
> >> > > > > trigger
> >> > > > > > a new download when the snapshot change on Nexus. (the
jars
> keep
> >> > the
> >> > > > same
> >> > > > > > name and the same version, SNAPSHOT, but the timestamp
> change).
> >> > > > > >
> >> > > > > > Here is my settings:
> >> > > > > >
> >> > > > > > <url name="my-resolver"
> >> > > > > >           changingPattern="\*-SNAPSHOT"
> >> > > > > >           changingMatcher="regexp"
> >> > > > > >           m2compatible="true">
> >> > > > > > ...
> >> > > > > >
> >> > > > > > Did I miss something here or ?
> >> > > > > >
> >> > > > > > Also, you mentions there would be several way to do
so, would
> >> mind
> >> > > > > > elaborate
> >> > > > > > (quickly) ? I think it would help me have a better
grasp of
> Ivy
> >> (at
> >> > > > least
> >> > > > > > regarding how I use it).
> >> > > > > >
> >> > > > > > Thanks !
> >> > > > > >
> >> > > >
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Romain PELISSE,
> >> > *"The trouble with having an open mind, of course, is that people will
> >> > insist on coming along and trying to put things in it" -- Terry
> >> Pratchett*
> >> > http://belaran.eu/wordpress/belaran
> >> >
> >>
> >
> >
> >
> > --
> > Romain PELISSE,
> > *"The trouble with having an open mind, of course, is that people will
> > insist on coming along and trying to put things in it" -- Terry
> Pratchett*
> > http://belaran.eu/wordpress/belaran
> >
>
>
>
> --
> Romain PELISSE,
> *"The trouble with having an open mind, of course, is that people will
> insist on coming along and trying to put things in it" -- Terry Pratchett*
> http://belaran.eu/wordpress/belaran
>
>
>
>
>


-- 
Romain PELISSE,
*"The trouble with having an open mind, of course, is that people will
insist on coming along and trying to put things in it" -- Terry Pratchett*
http://belaran.eu/wordpress/belaran

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