sbt-assembly:使用pom.properties进行重复数据删除错误

时间:2015-01-10 21:30:30

标签: scala sbt sbt-assembly

我使用的是sbt 0.13.7和sbt-assembly 0.12.0。

以下是" sbt assembly"

期间的错误消息
[error] (sse/*:assembly) deduplicate: different file contents found in the following:
[error] /Users/arunswami/.ivy2/cache/org.apache.avro/avro-ipc/jars/avro-ipc-1.7.7-tests.jar:META-INF/maven/org.apache.avro/avro-ipc/pom.properties
[error] /Users/arunswami/.ivy2/cache/org.apache.avro/avro-ipc/jars/avro-ipc-1.7.7.jar:META-INF/maven/org.apache.avro/avro-ipc/pom.properties

以下是基于https://github.com/sbt/sbt-assembly#merge-strategy的README的build.sbt文件的相关部分:

assemblyMergeStrategy in assembly := {
  case PathList(ps @ _*) if ps.last endsWith "pom.properties" =>
    MergeStrategy.discard
  case x =>
    val oldStrategy = (assemblyMergeStrategy in assembly).value
    oldStrategy(x)
}

我应该做什么呢?

感谢。

1 个答案:

答案 0 :(得分:2)

您的合并策略看起来不错,但错误消息显示为sse/*:assembly。 您的合并策略是否包含在sse项目中?