2015-02-10 49 views
0

我想通過爲我的項目運行sb​​t程序集來製作一個胖罐子。 我收到以下錯誤:sbt程序集由於衝突的文件而失敗

[error] (root/*:assembly) deduplicate: different file contents found in the following: 
[error] /Users/xyz/.ivy2/cache/org.apache.hadoop/hadoop-mapreduce-client-core/jars/hadoop-mapreduce-client-core-2.2.0.jar:org/apache/hadoop/filecache/DistributedCache.class 
[error] /Users/xyz/.ivy2/cache/org.apache.hadoop/hadoop-core/jars/hadoop-core-2.0.0-mr1-cdh4.7.1.jar:org/apache/hadoop/filecache/DistributedCache.class 

DistributedCache類Hadoop MapReduce的客戶端核心已經被廢棄了。 在我build.sbt我已經包括:

"org.apache.hadoop" % "hadoop-client" % "2.0.0-mr1-cdh4.7.1" excludeAll(
    ExclusionRule(organization = "javax.servlet")) 

的依賴關係是這樣的:

org.apache.hadoop:hadoop-client:2.2.0 
org.apache.hadoop:hadoop-mapreduce-client-app:2.2.0 
    org.apache.hadoop:hadoop-mapreduce-client-core:2.2.0 

如何處理呢?

在此先感謝!

回答

0

,如果你打算當它是負擔時,你靠Hadoop的客戶端上刪除MapReduce的客戶端應用程序的相關性JAR:2.2.0,只需簡單地添加不及物動詞:

"org.apache.hadoop" % "hadoop-client" % "2.2.0" intransitive() 

這僅會包括hadoop-client:2.2.0 jar並排除所有的依賴關係。

相關問題