You have to stick that new resolver in the chain of resolvers.

The tutorial has a good explanation of this:
http://ant.apache.org/ivy/history/2.0.0-alpha2/tutorial/defaultconf.html

But basically the ivysettings-default-chain.xml, calls your local
resolver then the main chain.  The main chain calls the shared, then
public resolvers. (or something like that) Just define a new public
chain and stick your resolver in there.

Jon

-----Original Message-----
From: Dave Brosius [mailto:[email protected]] 
Sent: Monday, August 31, 2009 5:16 PM
To: [email protected]
Subject: Configuring a separate repository

Greetings,

   I am trying to setup ivy to pull jbpm jars from the jboss repository.

This is what i have tried, hopefully someone can slap me around here.

I have created my own ivysettings.xml file as such
----------------------------------------------
<ivysettings>
    <properties file="ivysettings.properties"/>
    <settings defaultResolver="default"/>
    <include url="${ivy.default.settings.dir}/ivysettings-public.xml"/>
    <include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
    <include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
    <include
url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
    <include
url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
    <include url="${basedir}/../../ivyconf.xml"/>
</ivysettings>
----------------------------------------------

And created the new resolver file (ivyconf.xml) as such
----------------------------------------------
<ivysettings>
    <resolvers>
        <url name="jbpm" m2compatible="true">
            <artifact
pattern="http://repository.jboss.com/maven2/[organisation]/[module]/[rev
ision]/[artifact]-[revision].[ext]"/>
        </url>
    </resolvers>
</ivysettings>
----------------------------------------------
In my ant's build.xml file i reference this settings file

    <ivy:settings file="${basedir}/../../ivysettings.xml"/>

and this seems to work for other things, because it's pulling in version
numbers from the referenced "ivysettings.properties" file.
however, when ivy runs it doesn't seem to mention trying this
repository, as such:
----------------------------------------------
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve]         module not found: org.jbpm.jbpm4#jbpm-jpdl;4.1
[ivy:retrieve]     ==== local: tried
[ivy:retrieve]
/home/dave/.ivy2/local/org.jbpm.jbpm4/jbpm-jpdl/4.1/ivys/ivy.xml
[ivy:retrieve]       -- artifact
org.jbpm.jbpm4#jbpm-jpdl;4.1!jbpm-jpdl.jar:
[ivy:retrieve]
/home/dave/.ivy2/local/org.jbpm.jbpm4/jbpm-jpdl/4.1/jars/jbpm-jpdl.jar
[ivy:retrieve]     ==== shared: tried
[ivy:retrieve]
/home/dave/.ivy2/shared/org.jbpm.jbpm4/jbpm-jpdl/4.1/ivys/ivy.xml
[ivy:retrieve]       -- artifact
org.jbpm.jbpm4#jbpm-jpdl;4.1!jbpm-jpdl.jar:
[ivy:retrieve]
/home/dave/.ivy2/shared/org.jbpm.jbpm4/jbpm-jpdl/4.1/jars/jbpm-jpdl.jar
[ivy:retrieve]     ==== public: tried
[ivy:retrieve]
http://repo1.maven.org/maven2/org/jbpm/jbpm4/jbpm-jpdl/4.1/jbpm-jpdl-4.1
.pom
[ivy:retrieve]       -- artifact
org.jbpm.jbpm4#jbpm-jpdl;4.1!jbpm-jpdl.jar:
[ivy:retrieve]
http://repo1.maven.org/maven2/org/jbpm/jbpm4/jbpm-jpdl/4.1/jbpm-jpdl-4.1
.jar
----------------------------------------------

could anyone point me in the right direction as to how to add
alternative maven repositories?

Reply via email to