Apache Ivy多个解析器

时间:2009-10-18 16:53:33

标签: ant ivy

尝试获取IvyRoundUp打包器存储库并让maven存储库与apache常春藤中的链解析器一起使用

使用以下

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

现在,当我运行常春藤:在我的蚂蚁构建中进行后退时,它会出现

[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] 

从常春藤网站上我可以看出这意味着我有两个解析器和常春藤应该检查两个存储库我错过了什么,因为它没有击中cukes解析器

1 个答案:

答案 0 :(得分:4)

解决方案是

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