千家信息网

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

发表于:2025-02-03 作者:千家信息网编辑
千家信息网最后更新 2025年02月03日,参考文章:http://blog.csdn.net/oopsoom/article/details/41318599[error] (marathon/*:assembly) deduplicate:
千家信息网最后更新 2025年02月03日sbt assembly编译打包时报: deduplicate: different file contents found in the following:

参考文章:

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关键字了

最终打包成功:


0