简体   繁体   English

Apache Ivy依赖项force =“ true”不起作用

[英]Apache Ivy dependencies force=“true” does not work

My project has commons-codec as a dependency and uses Ivy. 我的项目使用commons编解码器作为依赖项,并使用Ivy。
Some other dependencies need commons-codec-1.6 and 1.2. 其他一些依赖项需要commons-codec-1.6和1.2。

Now my problem is that Ivy evicts my version(1.4) and instead uses 1.6. 现在我的问题是Ivy退出了我的版本(1.4),而是使用1.6。
<dependency org="commons-codec" name="commons-codec" force="true" rev="1.4" />

Why doesn't force work? 为什么不强制工作? Has anyone encountered this yet? 有人遇到过吗?

FYI i have used this before and it worked... 仅供参考,我以前使用过它,并且有效...

You need to use a conflict indicator, to override the default behaviour which will be to choose the latest revision of the same dependency. 您需要使用冲突指示器来覆盖默认行为,该行为将选择相同依赖项的最新版本。

For an example see the following answer: 有关示例,请参见以下答案:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM