更改作为传递依赖项调用的ivy.xml文件 [英] Alter ivy.xml file called in as transitive dependency
问题描述
我正在使用ivy来解决依赖关系,我对jdom的直接依赖关系是ivy.xml上的条目
I am using ivy to resolve dependencies, the direct dependency I have is for jdom with the entry on ivy.xml as
<dependency org="org.jdom" name="jdom" rev="2.0.2"/>
这将其他几个jar称为传递依赖项-不幸的是,根据此处和此处.不幸的是,这些问题通过修复Maven Pom得以回答.
This calls in several other jars as transitive dependencies - unfortunately one, jaxen, has a non working dependency as per Jaxen bug and various questions on SO here and here. Unfortunately these questions are answered with a fix to a maven pom.
我的问题是,在常春藤设置中我该怎么做,以便将更正的常春藤文件用于jaxen,或者只是抑制试图加载findbug和cobertura的jaxen?
My question is what can I do in my ivy setup to use a corrected ivy file for jaxen or just suppress jaxen trying to load findbugs and cobertura?
推荐答案
Ivy allows to exclude specified dependencies from resolution.
这将从依赖项中排除jaxen:
This will exclude jaxen from the dependency:
<dependency org="org.jdom" name="jdom" rev="2.0.2">
<exclude module="jaxen"/>
</dependency>
这将排除cobertura和findbugs
This will exclude cobertura and findbugs
<dependency org="org.jdom" name="jdom" rev="2.0.2">
<exclude name="maven-cobertura-plugin" />
<exclude name="maven-findbugs-plugin" />
</dependency>
这篇关于更改作为传递依赖项调用的ivy.xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!