sbt assembly编译打包时报: deduplicate: different file contents found in the following:

简介:

参考文章:

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

wKiom1mRDPnh2L49AAKa8r5-q1Y320.png-wh_50

[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文件里添加以下内容:

wKioL1mRDPfSqekcAAFbXSQwiv0892.png-wh_50

    根据上面报的异常,因此,这里添加了两项内容。

    然后,重新运行

#sbt clean compile assembly

在运行过程中,会抛一个警告:

wKiom1mRDPfxwSgAAAO8CAYwllM313.png-wh_50

不建议使用mergeStrategy关键字了

最终打包成功:

wKiom1mRDc6y-kf7AACfb6ay3WY533.png-wh_50

 、












本文转自故新51CTO博客,原文链接:http://blog.51cto.com/xingej/1956036 ,如需转载请自行联系原作者





相关文章
|
9月前
Get Files In Folder [ DTFolderFiles ] Plug-in description
Get Files In Folder [ DTFolderFiles ] Plug-in description
28 0
|
4月前
解决运行qmake:Project ERROR: Cannot run compiler ‘cl‘. Output:
解决运行qmake:Project ERROR: Cannot run compiler ‘cl‘. Output:
110 0
|
9月前
Get Files In Folder [ DTFolderFiles ] 插件说明
Get Files In Folder [ DTFolderFiles ] 插件说明
41 0
Get Files In Folder [ DTFolderFiles ] 插件说明
|
JavaScript
The file is in the program because: Imported via xxx Root file specified for compilation Vetur(1261)
The file is in the program because: Imported via xxx Root file specified for compilation Vetur(1261)
122 0
The file is in the program because: Imported via xxx Root file specified for compilation Vetur(1261)
|
开发工具
Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
88 0
cl.exe is unable to create an executable file. C compiler test failed.
cl.exe is unable to create an executable file. C compiler test failed.
145 0
|
Java
编译OpenJDK:invalid configuration Files: machine Files not recognized
编译OpenJDK:invalid configuration Files: machine Files not recognized
83 0
|
开发工具 Android开发
eclipse Unable to build: the file dx.jar was not loaded from the SDK folder的解决办法
eclipse Unable to build: the file dx.jar was not loaded from the SDK folder的解决办法
87 0
|
Java Maven
如何处理Maven build时的error message Unable to locate the Javac Compiler in tools.jar
如何处理Maven build时的error message Unable to locate the Javac Compiler in tools.jar
如何处理Maven build时的error message Unable to locate the Javac Compiler in tools.jar
|
iOS开发
Xcode 10: third-party: 'config.h' file not found
升级xcode到10版本之后 遇到 config.h 文件找不到的问题 In the Terminal, navigate to the react-native/third-party/glog folder inside node_modules...
1543 0