开发者

Apache Ivy multiple resolvers

开发者 https://www.devze.com 2022-12-09 00:25 出处:网络
Trying to get IvyRoundUp packager repository and cukes maven repository to work with chain resolvers in apache ivy

Trying to get IvyRoundUp packager repository and cukes maven repository to work with chain resolvers in apache ivy

using the following

<settings defaultResolver="roundup"/>
<resolvers>
    <chain name="resolvers">
        <url name="cukes" m2compatible="true">
            <artifact
                    pattern="http://cukes.info/maven/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
        </url>

        <packager name="roundup" buildRoot="${user.home}/.ivy2/packager/build"
                  resourceCache="${user.home}/.ivy2/packager/cache">
            <ivy pattern="http://ivyroundup.googlecode.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/ivy.xml"/>
            <artifact
                    pattern="http://ivyroundup.googlecode.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/packager.xml"/>
        </packager>
    </chain>
</resolvers>

now when i run ivy:retreive in my ant build it comes up with

[ivy:retrieve] 
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve]          module not found: cuke4duke#cuke4duke;0.1.6
[ivy:retrieve]  ==== roundup: tried
[ivy:retrieve]    http://ivyroundup.googlecode.com/svn/trunk/repo/modules/cuke4duke/cuke4duke/0.1.6/ivy.xml
[ivy:retrieve]    -- artifact cuke4duke#cuke4duke;0.1.6!cuke4duke.jar:
[ivy:retrieve]    http://ivyroundup.googlecode.com/svn/trunk/repo/modules/cuke4duke/cuke4duke/0.1.6/packager.xml
[ivy:retrieve]          module not found: org.jruby#jruby-complete;1.4.0RC1
[ivy:retrieve]  ==== roundup: tried
[ivy:retrieve]    http://ivyroundup.googlecode.com/svn/trunk/repo/modules/org.jruby/jruby-complete/1.4.0RC1/ivy.xml
[ivy:retrieve]    -- artifact org.jruby#jruby-complete;1.4.0RC1!jruby-complete.jar:
[ivy:retrieve]    http://ivyroundup.googlecode.com/svn/trunk/repo/modules/org.jruby/jruby-complete/1.4.0RC1/packager.xml
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]          :: cuke4duke#cuke4duke;0.1.6: not found
[ivy:retrieve]          :: org.jruby#jruby-complete;1.4.0RC1:开发者_开发知识库 not found
[ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] 

from what i can make out from the ivy website this means i have 2 resolvers and ivy should check both repositories what am I missing, as its not hitting the cukes resolver


the solution is

<settings defaultResolver="chain-1"/>
<resolvers>
    <packager name="roundup" buildRoot="${user.home}/.ivy2/packager/build"
              resourceCache="${user.home}/.ivy2/packager/cache">
        <ivy pattern="http://ivyroundup.googlecode.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/ivy.xml"/>
        <artifact
                pattern="http://ivyroundup.googlecode.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/packager.xml"/>
    </packager>
    <chain name="chain-1">
        <resolver ref="roundup"/>
        <ibiblio name="ibiblio" m2compatible="true" usepoms="true"/>
        <url name="cukes" m2compatible="true">
            <artifact
                    pattern="http://cukes.info/maven/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
        </url>
    </chain>
</resolvers>

0

精彩评论

暂无评论...
验证码 换一张
取 消