【问题标题】:Ivy's transitive="false" gets simply ignored when downloading from Nexus从 Nexus 下载时,常春藤的 transitive="false" 会被忽略
【发布时间】:2015-01-24 16:16:54
【问题描述】:

在我们公司,我们正在将旧的 ivy 存储库迁移到 Nexus。

将我们自己的工件上传到 Nexus 后,我尝试下载一些项目的依赖项来测试设置,但我在 spring-web 上失败了。让我解释一下。

这里是 ivy-settings.xml 文件,仅指向我们本地的 Nexus 安装

<?xml version="1.0" encoding="ISO-8859-1"?>

<ivysettings>

    <settings defaultResolver="default" />

    <resolvers>
        <ibiblio name="nexus" m2compatible="true" root="http://nexus.local/nexus/content/repositories/central/" />
        <ibiblio name="our-nexus" m2compatible="true" root="http://nexus/nexus/content/repositories/repo" />

        <chain name="default" returnFirst="true">
            <resolver ref="our-nexus" />
            <resolver ref="nexus" />
        </chain>
    </resolvers>
</ivysettings>

在我们的一个项目中,我们使用 Spring Web,但不是所有的依赖项,所以我声明

<dependency org="org.springframework" name="spring-web" rev="3.0.5.RELEASE" transitive="false" />

这在使用 Ivy 存储库时效果很好。但是今天我无法执行&lt;ivy:retrieve&gt; 任务,因为它找不到com.caucho#hessian#3.2.1

&lt;ivy:report&gt;任务说spring-web需要这种版本的hessian3.2.11.RELEASE

但是我已经声明了transitive="false"!!!

为什么它不起作用?我错过了什么/搞砸了什么?

【问题讨论】:

    标签: java maven ivy nexus


    【解决方案1】:

    应该可以。我个人更喜欢配置映射。请尝试以下方法:

    <dependency org="org.springframework" name="spring-web" rev="3.0.5.RELEASE" conf="default->master" />
    

    更多详情见:

    【讨论】:

      猜你喜欢
      • 2011-07-20
      • 2011-02-25
      • 2016-10-24
      • 2011-10-26
      • 2018-07-02
      • 2015-03-05
      • 2016-08-17
      • 2015-12-16
      • 2017-08-13
      相关资源
      最近更新 更多