Alter ivy.xml file called in as transitive dependency

余生长醉 提交于 2019-12-13 09:53:12

问题


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"/>

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.

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?


回答1:


Ivy allows to exclude specified dependencies from resolution.

This will exclude jaxen from the dependency:

<dependency org="org.jdom" name="jdom" rev="2.0.2">
  <exclude module="jaxen"/>
</dependency>

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>


来源:https://stackoverflow.com/questions/11762096/alter-ivy-xml-file-called-in-as-transitive-dependency

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!