【发布时间】:2014-04-29 04:15:05
【问题描述】:
我在同一个项目中使用 json-schema-validator 和 guava。当我尝试更新其中一个时,我遇到了 findbugs 的冲突,所以一个库被遗漏了。
工作版本是:
- json-schema-validator 2.0.0
- 番石榴13.0.1
两者都依赖于 findbugs 1.3.9
我想使用的版本:
- json-schema-validator 2.2.1
- 番石榴16.0.1
这里 json-schema-validator 需要 findbugs (jsr305) 2.0.1,guava 需要 findbugs 1.3.9。有没有办法解决这个问题?我的意思是我可以在我的项目中使用 json-schema-validator 版本 2.2.1 和 guava 16.0.1。
示例文件:
构建.xml
<project name="example" default="download"
xmlns:ivy="antlib:org.apache.ivy.ant">
<target name="download" description="resolve dependencies with ivy">
<ivy:resolve />
<ivy:retrieve sync="true" type="jar"/>
</target>
</project>
ivy.xml,工作中
<?xml version="1.0" encoding="ISO-8859-1"?>
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="example" module="example" status="integration">
</info>
<dependencies>
<dependency org="com.github.fge" name="json-schema-validator" rev="2.0.0" />
<dependency org="com.google.guava" name="guava" rev="13.0.1" />
</dependencies>
</ivy-module>
ivy.xml,不工作
<?xml version="1.0" encoding="ISO-8859-1"?>
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="example" module="example" status="integration">
</info>
<dependencies>
<dependency org="com.github.fge" name="json-schema-validator" rev="2.2.1" />
<dependency org="com.google.guava" name="guava" rev="16.0.1" />
</dependencies>
</ivy-module>
驱逐通知:
[ivy:resolve] :: evicted modules:
[ivy:resolve] com.google.code.findbugs#jsr305;1.3.9 by [com.google.code.findbugs#jsr305;2.0.1] in [default]
【问题讨论】:
-
一个示例 ivy.xml 文件会有所帮助。