Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
507 views
in Technique[技术] by (71.8m points)

Alter ivy.xml file called in as transitive dependency

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...