ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aspdeepak <>
Subject How to eagerly download an artifact from ivy repository?
Date Thu, 03 Feb 2011 14:14:33 GMT

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="${}"
user="${ivy.ssh.username}" checkmodified="true">
				<artifact pattern="ivy/${ivy.ivyrep.default.artifact.pattern}"/>  			
<ibiblio name="ibiblio-maven2"...


build.xml (used in B)
<!--  ivy related tasks -->
    <target name="resolve" >
        <echo>Resolving using conf from ${ivy.conf.file} for all
    	<property name="ivy.resolver.default.check.modified" value="true"/>
        <configure file="${ivy.conf.file}" />
        <resolve file="${ivy.dep.file}"/>

    <target name="env" depends="resolve">
        <retrieve pattern="${ivy.retrieve.pattern}" conf="*" sync="true"
overwriteMode="newer" />

ivy.xml (used in B)
		<dependency org="myorg" name="A"  rev="2.1.0" changing="true"  />

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
  [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-PC default
produced in
  [resolve] 	resolve done (928ms resolve - 3ms download)
  [resolve] :: SSH :: closing ssh connection from
  [resolve] :: SSH :: ssh connection closed from


Any help is greatly appreciable. 

View this message in context:
Sent from the ivy-user mailing list archive at

View raw message