[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ivy-user
Subject:    Re: ivy doesn't go to remote repo if partial artifacts are in maven local
From:       Mandie Smith <mandie () houseofgnomes ! net>
Date:       2010-12-10 15:31:26
Message-ID: AANLkTineiBP13doWiccpedoTVS-bxwF-fWxkWdiKv8kB () mail ! gmail ! com
[Download RAW message or body]

We use Archiva and have a similar mechanism where we want the local
repo to take precedence over the remote repo's, but hit the remote
system if it can't find what it needs locally.  Here's our working
ivysettings.xml

<ivysettings>
        <properties file="${ivy.settings.dir}/ivy.properties"
override="false" />
        <settings defaultResolver="main" circularDependencyStrategy="warn" />

        <resolvers>
                <chain name="archiva">
                        <ibiblio name="archiva-releases"
m2compatible="true" usepoms="true"

root="${ivy.repository.host}/${ivy.repository.releases}"
                                checkmodified="true" changingPattern=".*" />
                        <ibiblio name="archiva-snapshots" m2compatible="true"
                                usepoms="true"
root="${ivy.repository.host}/${ivy.repository.snapshots}"
                                checkmodified="true" changingPattern=".*" />
                        <ibiblio name="archiva-thirdparty" m2compatible="true"
                                usepoms="true"
root="${ivy.repository.host}/${ivy.repository.thirdparty}" />
                </chain>
                <filesystem name="local" checkmodified="true"
                        changingPattern=".*" m2compatible="false">
                        <artifact
pattern="${ivy.local.default.root}/${ivy.default.artifact.pattern}" />
                        <ivy
pattern="${ivy.local.default.root}/${ivy.default.ivy.pattern}" />
                </filesystem>
                <chain name="main" returnFirst="true">
                        <resolver ref="local" />
                        <resolver ref="archiva" />
                </chain>
        </resolvers>
</ivysettings>


On Thu, Dec 9, 2010 at 3:27 PM, Nick Bonatsakis <nbonatsakis@gmail.com> wrote:
> Hi Ivy Users,
>
> I am having an issue in a mixed maven/ivy environment where my artifacts are
> being stored on a remote Nexus. The scenario is as follows:
>
> Project foo has two artifacts, foo.jar and foo-tests.jar, it is present in
> the remote repository.
> Project bar uses maven to resolve only foo.jar (this results in the artifact
> ending up in the local maven repo).
> Project zeta uses ivy and depends on both foo.jar and foo-tests.jar. Ivy
> tries to find both artifacts in the local maven repo, however only finds
> foo.jar and fails. Ivy is not falling back on resolving the foo-tests.jar
> out of the remote repository.
>
> Of note is that if I do not compile bar and there is no trace of foo's
> artifacts in the local maven repo, ivy happily resolves both dependencies in
> zeta by pulling them from the remote repository.
>
> Anyone have any ieas how I should configure ivy to always fall back on the
> remote repo if it can't find what it needs in the maven repo?
>
> Thanks!
>
> --
> Nicholas Bonatsakis
> Software Engineer
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic