سؤال

In ivy.xml

   <dependency org="abc" name="validation" rev="1.0.+" changing="true" force="false"     conf="build->default"/>

in ivy settings:

    <chain name="hub-default-chain" returnFirst="true">
    <resolver ref="view-local"/>
    <resolver ref="hub-releases"/>

    </chain>

It resolves from hub-releases 1.0.25 but does not resolve 1.0.22 from view-local if nothing is present in hub-releases.I can not understand why it resolves in one repository but not in other.Please help.

Error:

    module not found:  abc#validation;1.0.+
    [ivy:cachepath]         ==== view-local: tried
    [ivy:cachepath]          completepath\view-  local\abc\validation\ivy.xml
    [ivy:cachepath]           [working@view-local]
    [ivy:cachepath]           -- artifact   abc#validation;1.0.+!validation.jar:

PS: view-local is a filesystem resolver and hub-releases is a url resolver.

This is my filesystem reolver

    <filesystem name="view-local"
                cache="view-local-cache"
                validate="true"
                local="${ivy.view-local.default.local}"
                checksums=""
                transactional="false"
                checkmodified="true"
                changingPattern="view-local">
        <ivy pattern="${ivy.view-local.default.repository.root}/${ivy.view-local.default.ivy.pattern}" />
        <artifact pattern="${ivy.view-local.default.repository.root}/${ivy.view-local.default.artifact.pattern}" />
    </filesystem>
هل كانت مفيدة؟

المحلول

I suspect your issue may be twofold.

First of all you are enabling the "returnFirst" parameter which would tell the chain resolver to favour one repo over the other:

Secondly I think you need to purge your ivy cache if you are changing the content of the repositories between resolve operations.

The cache would keep a record of previous resolves in order to optimize network operations.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top