1. 程式人生 > >sbt assembly編譯打包時報: deduplicate: different file contents found in the following:

sbt assembly編譯打包時報: deduplicate: different file contents found in the following:

assembly sbt marathon

參考文章:

http://blog.csdn.net/oopsoom/article/details/41318599

技術分享

[error] (marathon/*:assembly) deduplicate:different file contents found in the following:

[error] META-INF/aop.xml

[error]/root/.coursier/cache/v1/https/repo1.maven.org/maven2/io/kamon/kamon-core_2.11/0.6.7/kamon-core_2.11-0.6.7.jar:META-INF/aop.xml

[error]/root/.coursier/cache/v1/https/repo1.maven.org/maven2/io/kamon/kamon-scala_2.11/0.6.7/kamon-scala_2.11-0.6.7.jar:META-INF/aop.xml

[error] deduplicate: different filecontents found in the following:

[error]/root/.coursier/cache/v1/https/repo1.maven.org/maven2/io/netty/netty-handler/4.0.43.Final/netty-handler-4.0.43.Final.jar:META-INF/io.netty.versions.properties

[error]/root/.coursier/cache/v1/https/repo1.maven.org/maven2/io/netty/netty-common/4.0.43.Final/netty-common-4.0.43.Final.jar:META-INF/io.netty.versions.properties

[error]/root/.coursier/cache/v1/https/repo1.maven.org/maven2/io/netty/netty-buffer/4.0.43.Final/netty-buffer-4.0.43.Final.jar:META-INF/io.netty.versions.properties

[error]/root/.coursier/cache/v1/https/repo1.maven.org/maven2/io/netty/netty-codec-http/4.0.43.Final/netty-codec-http-4.0.43.Final.jar:META-INF/io.netty.versions.properties

[error]/root/.coursier/cache/v1/https/repo1.maven.org/maven2/io/netty/netty-transport/4.0.43.Final/netty-transport-4.0.43.Final.jar:META-INF/io.netty.versions.properties

[error]/root/.coursier/cache/v1/https/repo1.maven.org/maven2/io/netty/netty-codec/4.0.43.Final/netty-codec-4.0.43.Final.jar:META-INF/io.netty.versions.properties


紅色部分是沖突文件


解決措施:

marathon源碼的根目錄下

build.sbt文件或者assembly.sbt文件裏添加以下內容:

技術分享

根據上面報的異常,因此,這裏添加了兩項內容。

然後,重新運行

#sbt clean compile assembly

在運行過程中,會拋一個警告:

技術分享

不建議使用mergeStrategy關鍵字了

最終打包成功:

技術分享


本文出自 “XEJ分布式工作室” 博客,請務必保留此出處http://xingej.blog.51cto.com/7912529/1956036

sbt assembly編譯打包時報: deduplicate: different file contents found in the following: