作为 sbt 和 sbt-assembly 插件的新手,我对如何处理涉及我试图打包的依赖项中不同类定义的构建感到困惑。
[error] (*:assembly) deduplicate: different file contents found in the following:
[error] /Users/dm/.ivy2/cache/org.apache.tika/tika-app/jars/tika-app-1.3.jar:javax/xml/XMLConstants.class
[error] /Users/dm/.ivy2/cache/stax/stax-api/jars/stax-api-1.0.1.jar:javax/xml/XMLConstants.class
[error] /Users/dm/.ivy2/cache/xml-apis/xml-apis/jars/xml-apis-1.3.03.jar:javax/xml/XMLConstants.class
我已经添加:
mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
{
case PathList("javax", "xml", xs @ _*) => MergeStrategy.first
}
}
到我的 build.sbt 文件,但我仍然收到上面的错误(无论它是否在构建文件中)。任何指导将不胜感激。
谢谢,
大学教师