lemine youssef
Tue, 29 Dec 2009 15:30:39 -0800
Garima Bathla a écrit : Thanks for your response :-) ; my answers, explanations inside your response.
I did not quite understood your problem? Dependencies that do not exist will fail and looks like you do undestand that.
I do understand.
When I try to resolve an artifact B which depends on artifact A it fails
because the "latest.integration" of B dpends on* a non existing revision of
A.*
I also see, the B module depends on same or higher revisions of A
so e.g. revision 1 of B depends on revision 1 or higher till 2 of A
revision 2 of B depends on revision 2 or higher till 3 of A
revision 3 of B depends on revision 3 of A
So if you have no idea on who is developing module A or it is always going
to be a fixed revision I suggest you fix the dependency element in moduleB
to depend on revision (,3.0]
<dependency org="org.addons" name="addonA" transitive="true" rev="(,3.0]"/>
module A is always growing with time and every-time he came non
compatible with
B, I do the necessary changes (and raise the revision) on the module B .but for some production environment will always keep a specific version of A (may be an old one),
therefore we keep that version locally.for ivy I supposed that he will search for latest for module B for which we can resolve dependencies. Actually he searches for the laster version of A regardless of the existence of dependences.
I hope Its now clear for you. thank u again. Youssef.
HTH, Garima. On Tue, Dec 29, 2009 at 11:42 AM, lemine youssef < youssef.m-lem...@nereide.biz> wrote:Hi all; When I try to resolve an artifact B which depends on artifact A it fails because the "latest.integration" of B dpends on a non existing revision of A. I have two locals repositories and use a chain resolver like this <ivysettings> <settings defaultResolver="test"/> <caches defaultCacheDir="${ivy.cache.dir}/ivy-cache"> <cache name="mycache" basedir="${ivy.cache.dir}/repository" ivyPattern="ivy.xml" artifactPattern="[artifact]-[revision].jar" lockStrategy="no-lock" defaultTTL="5s"> </cache> </caches> <resolvers> <chain name="test"> <filesystem name="company"> <ivy pattern="${ivy-home-repo}/repository2/[module]/[revision]/ivy.xml" /> <artifact pattern="${ivy-home-repo}/repository2/[module]/[revision]/[artifact]-[revision].jar" /> </filesystem> <filesystem name="woekspace"> <ivy pattern="${ivy-home-repo}/repository1/[module]/[revision]/ivy.xml"/> <artifact pattern="${ivy-home-repo}/repository1/[module]/[revision]/[artifact]-[revision].jar"/> </filesystem> </chain> </resolvers> <modules> <module organisation="org.addons" name="addonA" resolver="internal" /> </modules> </ivysettings> repository 1: contains only one revision of the module addonA <ivy-module version="2.0"> <info organization="org.addons" module="addonA" revision="1.0"/> <dependencies> </dependencies> </ivy-module> repository 2: contains many revisions of the module addonB ========================Version 1.0===================================== <ivy-module version="2.0"> <info organization="org.addons" module="addonB" revision="1.0"/> <dependencies> <dependency org="org.addons" name="addonA" transitive="true" rev="[1,2["/> </dependencies> </ivy-module> ========================Version 2.0===================================== <ivy-module version="2.0"> <info organization="org.addons" module="addonB" revision="2.0"/> <dependencies> <dependency org="org.addons" name="addonA" transitive="true" rev="[2,3["/> </dependencies> </ivy-module> ========================Version 3.0===================================== <ivy-module version="2.0"> <info organization="org.addons" module="addonB" revision="3.0"/> <dependencies> <dependency org="org.addons" name="addonA" transitive="true" rev="[3,)"/> </dependencies> </ivy-module>