2

build.scala で除外パターンを指定するのに苦労しています。build.sbt について言及している投稿はほとんど見たことがありません。私はsbtが初めてです。誰かが build.scala に除外パターンを書くのを手伝ってくれませんか?

アセンブリの実行中にエラーが発生する以下の 2 つのパッケージを除外したい: xmlbeans と xml-apis

Error : 
[trace] Stack trace suppressed: run last app/*:assembly for the full output.
[error] (app/*:assembly) deduplicate: different file contents found in the following:
[error] /Users/rajeevprasanna/.ivy2/cache/org.apache.xmlbeans/xmlbeans/jars/xmlbeans-2.3.0.jar:org/w3c/dom/TypeInfo.class
[error] /Users/rajeevprasanna/.ivy2/cache/xml-apis/xml-apis/jars/xml-apis-1.3.03.jar:org/w3c/dom/TypeInfo.class

このファイルを参照して build.scala を書きました: https://github.com/eed3si9n/sbt-assembly-full-config-sample/blob/master/project/builds.scala

4

1 に答える 1

5

どの依存関係 ("oldstuff") が間違ったバージョンの xmlbeans または xml-apis を取り込んでいるかを特定し、次のように一方または両方の依存関係を除外します。

libraryDependencies ++= Seq(
  "org.old"  % "oldstuff"" % "0.5" 
     exclude ("org.apache.xmlbeans", "xmlbeans")
     exclude ("xml-apis", "xml-apis"),
  ...
  ...
)

~/.ivy2/cache正確な名前を取得するには、ディレクトリを調べる必要がある場合があります。

于 2013-12-04T17:55:46.857 に答える