Scala 重复数据消除公用验证程序-sbt程序集

Scala 重复数据消除公用验证程序-sbt程序集,scala,maven,sbt,Scala,Maven,Sbt,下面是commons验证器的依赖关系图 在我的体形中我有 "commons-validator" % "commons-validator" % "1.4.1" 下面是commons验证器的依赖关系图 [info] +-commons-validator:commons-validator:1.4.1 [info] | +-commons-beanutils:commons-beanutils:1.8.3 [info] | | +-commons-logging:commons-l

下面是commons验证器的依赖关系图

在我的体形中我有

"commons-validator" % "commons-validator" % "1.4.1"
下面是commons验证器的依赖关系图

[info]   +-commons-validator:commons-validator:1.4.1
[info]   | +-commons-beanutils:commons-beanutils:1.8.3
[info]   | | +-commons-logging:commons-logging:1.1.1 (evicted by: 1.2)
[info]   | | +-commons-logging:commons-logging:1.2
[info]   | |
[info]   | +-commons-collections:commons-collections:3.2.1
[info]   | +-commons-digester:commons-digester:1.8.1
[info]   | +-commons-logging:commons-logging:1.2
当我运行sbt assembly构建一个独立的jar时,我得到

[trace] Stack trace suppressed: run last *:assembly for the full output.
[error] (*:assembly) deduplicate: different file contents found in the following:
[error] /Users/ali/.ivy2/cache/commons-beanutils/commons-beanutils/jars/commons-beanutils-1.8.3.jar:org/apache/commons/collections/ArrayStack.class
[error] /Users/ali/.ivy2/cache/commons-collections/commons-collections/jars/commons-collections-3.2.1.jar:org/apache/commons/collections/ArrayStack.class
[error] deduplicate: different file contents found in the following:
[error] /Users/ali/.ivy2/cache/commons-beanutils/commons-beanutils/jars/commons-beanutils-1.8.3.jar:org/apache/commons/collections/Buffer.class
[error] /Users/ali/.ivy2/cache/commons-collections/commons-collections/jars/commons-collections-3.2.1.jar:org/apache/commons/collections/Buffer.class
[error] deduplicate: different file contents found in the following:
[error] /Users/ali/.ivy2/cache/commons-beanutils/commons-beanutils/jars/commons-beanutils-1.8.3.jar:org/apache/commons/collections/BufferUnderflowException.class
[error] /Users/ali/.ivy2/cache/commons-collections/commons-collections/jars/commons-collections-3.2.1.jar:org/apache/commons/collections/BufferUnderflowException.class
[error] deduplicate: different file contents found in the following:
[error] /Users/ali/.ivy2/cache/commons-beanutils/commons-beanutils/jars/commons-beanutils-1.8.3.jar:org/apache/commons/collections/FastHashMap$1.class
[error] /Users/ali/.ivy2/cache/commons-collections/commons-collections/jars/commons-collections-3.2.1.jar:org/apache/commons/collections/FastHashMap$1.class
[error] deduplicate: different file contents found in the following:
[error] /Users/ali/.ivy2/cache/commons-beanutils/commons-beanutils/jars/commons-beanutils-1.8.3.jar:org/apache/commons/collections/FastHashMap$CollectionView$CollectionViewIterator.class
[error] /Users/ali/.ivy2/cache/commons-collections/commons-collections/jars/commons-collections-3.2.1.jar:org/apache/commons/collections/FastHashMap$CollectionView$CollectionViewIterator.class
[error] deduplicate: different file contents found in the following:
[error] /Users/ali/.ivy2/cache/commons-beanutils/commons-beanutils/jars/commons-beanutils-1.8.3.jar:org/apache/commons/collections/FastHashMap$CollectionView.class
[error] /Users/ali/.ivy2/cache/commons-collections/commons-collections/jars/commons-collections-3.2.1.jar:org/apache/commons/collections/FastHashMap$CollectionView.class
[error] deduplicate: different file contents found in the following:
[error] /Users/ali/.ivy2/cache/commons-beanutils/commons-beanutils/jars/commons-beanutils-1.8.3.jar:org/apache/commons/collections/FastHashMap$EntrySet.class
[error] /Users/ali/.ivy2/cache/commons-collections/commons-collections/jars/commons-collections-3.2.1.jar:org/apache/commons/collections/FastHashMap$EntrySet.class
[error] deduplicate: different file contents found in the following:
[error] /Users/ali/.ivy2/cache/commons-beanutils/commons-beanutils/jars/commons-beanutils-1.8.3.jar:org/apache/commons/collections/FastHashMap$KeySet.class
[error] /Users/ali/.ivy2/cache/commons-collections/commons-collections/jars/commons-collections-3.2.1.jar:org/apache/commons/collections/FastHashMap$KeySet.class
[error] deduplicate: different file contents found in the following:
[error] /Users/ali/.ivy2/cache/commons-beanutils/commons-beanutils/jars/commons-beanutils-1.8.3.jar:org/apache/commons/collections/FastHashMap$Values.class
[error] /Users/ali/.ivy2/cache/commons-collections/commons-collections/jars/commons-collections-3.2.1.jar:org/apache/commons/collections/FastHashMap$Values.class
[error] deduplicate: different file contents found in the following:
[error] /Users/ali/.ivy2/cache/commons-beanutils/commons-beanutils/jars/commons-beanutils-1.8.3.jar:org/apache/commons/collections/FastHashMap.class
[error] /Users/ali/.ivy2/cache/commons-collections/commons-collections/jars/commons-collections-3.2.1.jar:org/apache/commons/collections/FastHashMap.class

关于如何解决此问题的任何想法?

可能对其他人有用

 ("commons-validator" % "commons-validator" % "1.4.1").exclude("commons-beanutils","commons-beanutils"),
  "commons-beanutils" % "commons-beanutils-bean-collections" % "1.8.3"