1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

sbt-assembly の io.netty.versions.properties の error

Posted at

sbt-aseembly を使うと

[error] (*:assembly) deduplicate: different file contents found in the following:
[error] /Users/ryoco/.ivy2/cache/io.netty/netty-handler/jars/netty-handler-4.0.41.Final.jar:META-INF/io.netty.versions.properties
[error] /Users/ryoco/.ivy2/cache/io.netty/netty-buffer/jars/netty-buffer-4.0.41.Final.jar:META-INF/io.netty.versions.properties
[error] /Users/ryoco/.ivy2/cache/io.netty/netty-common/jars/netty-common-4.0.41.Final.jar:META-INF/io.netty.versions.properties
[error] /Users/ryoco/.ivy2/cache/io.netty/netty-transport/jars/netty-transport-4.0.41.Final.jar:META-INF/io.netty.versions.properties
[error] /Users/ryoco/.ivy2/cache/io.netty/netty-codec/jars/netty-codec-4.0.41.Final.jar:META-INF/io.netty.versions.properties
[error] /Users/ryoco/.ivy2/cache/io.netty/netty-codec-http/jars/netty-codec-http-4.0.41.Final.jar:META-INF/io.netty.versions.properties
[error] /Users/ryoco/.ivy2/cache/io.netty/netty-transport-native-epoll/jars/netty-transport-native-epoll-4.0.41.Final-linux-x86_64.jar:META-INF/io.netty.versions.properties
[error] Total time: 7 s, completed 2016/09/21 15:16:13

などと出て困ってたけど、 assemblyMergeStrategy に

assemblyMergeStrategy in assembly := {
  case "io.netty.versions.properties" => MergeStrategy.concat
  case x =>
    val oldStrategy = (assemblyMergeStrategy in assembly).value
    oldStrategy(x)
}

にしても解決しなかったが、

assemblyMergeStrategy in assembly := {
  case "META-INF/io.netty.versions.properties" => MergeStrategy.concat
  case x =>
    val oldStrategy = (assemblyMergeStrategy in assembly).value
    oldStrategy(x)
}

にしたら解決した。META-INF をつける。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?