On your resolver, in addition to checkmodified="true", specify: changingPattern="*" changingMatcher="glob"
This will check if your published artifacts have changed even if your ivy.xml hasn't. No guarantee this will do the trick, but worth a shot. Your attempt to control this with overwriteMode="true" on ivy:retrieve is like trying to close the barn door after the horse has already gotten out. Ivy:retrieve is a post-resolve task, meaning it only gets involved after you've done ivy:resolve. And it is on the resolve where the caching behavior comes into play. By the way, I would recommend using ivy:cachepath or ivy:cachefileset instead of ivy:resolve. This way you're getting the modules straight from the horse's mouth (forgive all the horse expressions), i.e. the Ivy cache, rather than from an intermediary, an extra directory that's copied to. Fewer moving parts, fewer chances for things to go wrong. On Thu, Feb 3, 2011 at 6:14 AM, aspdeepak <aspdeepakfor...@gmail.com> wrote: > > I am currently using ivy version ivy-2.2.0. > > We have continuous integration(though not full scale), please consider the > following scenario. > > Module A is published to ivy repository using ssh resolver (works fine) > Module B has a dependency of 'A 2.1.0', supposed to retrieve A from ssh > repository. There are some cases where the minor release may not contain > any > version no change. In this scenario i need to eagerly fetch the latest copy > (in case if it is a newer one than in the local ivy-cache) to module B. > I tried overwriteMode="newer" but this has no effect. > > ivyconf.xml (used by A and B) > ----------- > ............ > <chain name="chain-resolver" returnFirst="true" > > <ssh name="mycompany-repository-ssh" keyFile="${ivy.ssh.key.location}" > keyFilePassword="${ivy.ssh.pass.phrase}" host="${ivy.repository.host}" > user="${ivy.ssh.username}" checkmodified="true"> > <artifact > pattern="ivy/${ivy.ivyrep.default.artifact.pattern}"/> > </ssh> > ............................ > <ibiblio name="ibiblio-maven2"... > ..... > > </chain> > > > build.xml (used in B) > --------- > <!-- ivy related tasks --> > <target name="resolve" > > <echo>Resolving using conf from ${ivy.conf.file} for all > configurations</echo> > <property name="ivy.resolver.default.check.modified" value="true"/> > <configure file="${ivy.conf.file}" /> > <resolve file="${ivy.dep.file}"/> > </target> > > <target name="env" depends="resolve"> > <retrieve pattern="${ivy.retrieve.pattern}" conf="*" sync="true" > overwriteMode="newer" /> > </target> > > > ivy.xml (used in B) > --------- > <dependencies> > <dependency org="myorg" name="A" rev="2.1.0" > changing="true" /> > </dependencies> > > ----------------------------------------------------------------------------' > > > > > build-- console log (clearly shows that it is not downloading but trying to > resolve from the cache) > > --------------------------------------------------------------------------------------------- > > [resolve] found myorg#A;2.1.0 in myorg-repository-ssh > [resolve] resolved ivy file produced in > > C:\Digi-ws\myproject-trunk\..\ivy-cache\resolved-myorg-free-trial-work...@mycompanyuser-pc.xml > [resolve] :: downloading artifacts :: > [resolve] [NOT REQUIRED] myorg#A;2.1.0!A.jar > [resolve] :: resolution report :: resolve 928ms :: artifacts dl 3ms > > --------------------------------------------------------------------- > | | modules || artifacts > | > | conf | number| search|dwnlded|evicted|| > number|dwnlded| > > --------------------------------------------------------------------- > | default | 1 | 1 | 0 | 0 || 1 | 0 > | > > --------------------------------------------------------------------- > [resolve] report for myorg#free-trial;working@mycompanyUser-PCdefault > produced in > C:\Digi-ws\myproject-trunk\..\ivy-cache\myorg-free-trial-default.xml > [resolve] resolve done (928ms resolve - 3ms download) > [resolve] :: SSH :: closing ssh connection from mycompanyIvyserver.com... > [resolve] :: SSH :: ssh connection closed from mycompanyIvyserver.com > > -------------------------------------------------------------------- > > > Any help is greatly appreciable. > > -- > View this message in context: > http://old.nabble.com/How-to-eagerly-download-an-artifact-from-ivy-repository--tp30835978p30835978.html > Sent from the ivy-user mailing list archive at Nabble.com. > >