Nexus Ivy Maven:二级依赖项忽略传递性 [英] Nexus Ivy Maven : Second Level Dependencies Ignores Transitive
问题描述
1.)我有一个具有常春藤依赖的Project1:
1.) I have a Project1 with this ivy dependency :
<dependency org="xalan" name="serializer" rev="2.7.1" transitive="false" conf="compile->default" />
该项目带来了serializer.jar(仅此jar,确定!)
This project brings serializer.jar (just only this jar, OK! )
2.)在第二个项目(Proyect2)中,我放置了下一个依赖项:
2.) In a second one Project (Proyect2) i put the next dependency :
<dependency org="com.net" name="Project1" rev="latest.integration" conf="default->default;compile->compile;runtime->runtime" transitive="true">
</dependency>
此项目2"带来了:
- 项目1
- Serializer.jar
-
xml-apis.jar
- Project 1
- Serializer.jar
xml-apis.jar
尽管在xalan依赖项中将过境置为假.
仅在Nexus和Maven中,我在Eclipse + IVEDe环境中没有这种行为.这似乎是错误的,因为在Project1上,我将xalan传递设置为false.
I haven't this behaviour in my Eclipse + IVEDe environment, just only with Nexus and Maven.... It seems to be wrong because on Project1 i set xalan transitive to false.
推荐答案
在Project 1中尝试以下依赖项,看看是否可以解决问题:
Try the following dependency in Project 1 and see if that fixes the problem:
<dependency org="xalan" name="serializer" rev="2.7.1" conf="compile->master" />
有关Ivy如何解释Maven模块和范围的信息,请参见以下答案:
See the following answer on how Ivy interprets Maven modules and scopes:
我不喜欢关闭传递依赖项.我认为最好依靠配置映射,如果绝对必要,请包括一个exclude语句以删除有害的依赖关系.
I'm not a fan of switching off transitive dependencies. I think it's much better to rely on configuration mappings and if absolutely necessary include an exclude statement to remove an objectionable dependency.
这篇关于Nexus Ivy Maven:二级依赖项忽略传递性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!