Apache 的两个 Maven 工件中有四个重复的类:commons-beanutils:commons-beanutils:1.8.3
and commons-collections:commons-collections:3.2.1
:
org.apache.commons.collections.ArrayStack
org.apache.commons.collections.Buffer
org.apache.commons.collections.BufferUnderflowException
org.apache.commons.collections.FastHashMap
是否可以用其他工件替换其中一个以避免这种重复?我尝试谷歌但没有找到任何解决方案。比较烦人的问题。
在这种情况下,问题不是 Maven 或排除(这通常是问题),而是您很可能使用了错误版本的 beanutils。
beanutils jar 的一个版本包含了 bean 集合,另一个版本则没有。具有 bean 集合的 beanutils 的 Maven 依赖项包括公共集合。如果您自己使用公共集合,请使用核心版本并将公共集合包含在 Maven 依赖项中。
这是稍微解释一下的地方:http://commons.apache.org/beanutils/ http://commons.apache.org/beanutils/
该页面是这样说的:
commons-beanutils.jar - contains everything
commons-beanutils-core.jar - excludes Bean Collections classes
commons-beanutils-bean-collections.jar - only Bean Collections classes
The main commons-beanutils.jar has an optional dependency on Commons Collections
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)