Thanks again for your care,

<<What is the expected behavior from ivy?>>
I expected Ivy to get the latest version of moduleB for wich he can resolve
the dependency of moduleA, thats means:
I excpect that ivy take the latest version of B trys to resole its dependencies and in case of failure, Ivy should take the previous version of B and so on until
it found a version of B for which the dependencies can be resolved.
if all version of B are tried without success the Ivy can stop and return UNRESOLVED DEPENDENCY.

In my case I excpect that Ivy proceed this way
   a)- take the version 3.0 of addonB (dependency on addonA not satisfied);
   b)- take the version 2.0 of addonB (dependency on addonA not satisfied);
c)- take the version 1.0 of addonB (dependency on addonA is now satisfied);
   return success.


<<but what you are seeing? >>
Ivy is trying to resolve the dependency of the absolute latest version of moduleB which is not possible, so he fails and stop.
In my case Ivy only tries the version 3.0 of B .

I hope is now clear
thank again for u'r time.

Youssef.


Garima Bathla a écrit :
I am little confused with your reply. Can you tell me please what you are expecting and what behavior you are seeing.

What is the expected behavior from ivy? but what you are seeing?

That will be problem statement for me to solve.. I am right now not clear.


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.
========================

    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>



So it is looking for 3 or higher version of A because that is how you have declared the dependencies for revision=3 for moduleB.



On Tue, Dec 29, 2009 at 3:29 PM, lemine youssef <[email protected] <mailto:[email protected]>> wrote:

    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 <
        [email protected]
        <mailto:[email protected]>> 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>





Reply via email to