gpt4 book ai didi

scala - SBT - Assembly (Scala - Neo4j),如何处理这个重复数据删除问题?

转载 作者:行者123 更新时间:2023-12-02 04:44:16 24 4
gpt4 key购买 nike

只是想用 sbt-assembly 生成一个 Jar,但我仍然被这个困住了:

[error] (*:assembly) deduplicate: different file contents found in the following:
[error] /Users/fsalvador/.ivy2/cache/org.neo4j/neo4j-kernel/jars/neo4j-kernel-1.9.4.jar:META-INF/CHANGES.txt
[error] /Users/fsalvador/.ivy2/cache/org.neo4j/neo4j-lucene-index/jars/neo4j-lucene-index-1.9.4.jar:META-INF/CHANGES.txt
[error] /Users/fsalvador/.ivy2/cache/org.neo4j/neo4j-graph-algo/jars/neo4j-graph-algo-1.9.4.jar:META-INF/CHANGES.txt
[error] /Users/fsalvador/.ivy2/cache/org.neo4j/neo4j-udc/jars/neo4j-udc-1.9.4.jar:META-INF/CHANGES.txt
[error] /Users/fsalvador/.ivy2/cache/org.neo4j/neo4j-cypher/jars/neo4j-cypher-1.9.4.jar:META-INF/CHANGES.txt
[error] /Users/fsalvador/.ivy2/cache/org.neo4j/neo4j-jmx/jars/neo4j-jmx-1.9.4.jar:META-INF/CHANGES.txt

在我的 build.sbt 中,我尝试了以下操作:

mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) => {
case PathList("ivy2", "cache", "org.neo4j", xs @ _*) => MergeStrategy.last
case "CHANGES.txt" => MergeStrategy.discard
case x => old(x)
}
}

但仍然没有快乐,几乎尝试了所有方法。

最佳答案

PathList(...) 提取器拆分路径字符串。以下应该有效:

mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) => {
case PathList("META-INF", "CHANGES.txt") => MergeStrategy.discard
case x => old(x)
}
}

关于scala - SBT - Assembly (Scala - Neo4j),如何处理这个重复数据删除问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20152343/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com