尽管有映射,但 Ivy makepom 将所有依赖项标记为可选 [英] Ivy makepom marks all dependencies as optional despite mapping

查看:22
本文介绍了尽管有映射,但 Ivy makepom 将所有依赖项标记为可选的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定:

<dependency org="foo" name="bar" />

并且没有配置,下面是蚂蚁片段:

and no configurations, following ant snippet:

<echo>${ivy.configuration}</echo>
<ivy:makepom ivyfile="${build.dir}/ivy.xml" pomfile="${build.dir}/${ivy.module}.pom">
  <mapping conf="default" scope="compile" />
</ivy:makepom>

生成具有对 foo.bar 的可选依赖项的 pom 并打印default".如果我将映射更改为 conf="*" 那么它可以工作 但它显然是次优的.

Produces pom with with optional dependency on foo.bar and prints "default". If I change mapping to conf="*" then it works but it is obviously suboptimal.

是否可以映射未​​指定的默认配置,或者我需要在 ivy.xml 中的所有依赖项上设置 conf="default" 吗?

Is it possible to map unspecified default configuration or do I need to set conf="default" on all dependencies in ivy.xml ?

推荐答案

看来映射*"是无害的.任何其他特定映射仍将优先.

It seems that mapping "*" is harmless. Any other specific mappings will still take precedence.

这篇关于尽管有映射,但 Ivy makepom 将所有依赖项标记为可选的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆