我需要列出所有sbt依赖项以检查是否已存在debian包(我还注意到有一个DEB包,但似乎没有打包外部依赖项).
目前,我使用以下步骤执行了sbt依赖项列表:
手动安装sbt
我创建了一个简单的脚本,它提取〜/ .ivi2目录中的所有jar文件(不包括sbt jar).这里是执行的结果:
Group;Artifact;Artifact+Version org.scala-lang;jline;jline-2.10.5 org.scala-lang;scala-compiler;scala-compiler-2.10.5 org.scala-lang;scala-library;scala-library-2.10.5 org.scala-lang;scala-reflect;scala-reflect-2.10.5 com.jcraft;jsch;jsch-0.1.46 org.scalamacros;quasiquotes_2.10;quasiquotes_2.10-2.0.1 jline;jline;jline-2.11 com.thoughtworks.paranamer;paranamer;paranamer-2.6 org.json4s;json4s-ast_2.10;json4s-ast_2.10-3.2.10 org.json4s;json4s-core_2.10;json4s-core_2.10-3.2.10 org.scala-lang.modules;scala-pickling_2.10;scala-pickling_2.10-0.10.0 org.scala-tools.sbinary;sbinary_2.10;sbinary_2.10-0.4.2 org.fusesource.jansi;jansi;jansi-1.4 org.spire-math;json4s-support_2.10;json4s-support_2.10-0.6.0 org.spire-math;jawn-parser_2.10;jawn-parser_2.10-0.6.0
您认为列出所有sbt依赖项的正确方法是什么?
有一个很好sbt plugin
的:https:
//github.com/jrudolph/sbt-dependency-graph
只需添加到~/.sbt/0.13/plugins/plugins.sbt
:
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.0")
打电话给sbt dependencyTree
你可以得到一个"ascii图",如:
... [info] | +-org.apache.lucene:lucene-spatial:4.10.2 [info] | | +-com.spatial4j:spatial4j:0.4.1 [info] | | +-org.apache.lucene:lucene-core:4.10.2 [info] | | +-org.apache.lucene:lucene-queries:4.10.2 [info] | | +-org.apache.lucene:lucene-core:4.10.2 [info] | | [info] | +-org.apache.lucene:lucene-suggest:4.10.2 [info] | +-org.apache.lucene:lucene-analyzers-common:4.10.2 [info] | | +-org.apache.lucene:lucene-core:4.10.2 [info] | | [info] | +-org.apache.lucene:lucene-core:4.10.2 [info] | +-org.apache.lucene:lucene-misc:4.10.2 [info] | | +-org.apache.lucene:lucene-core:4.10.2 [info] | | [info] | +-org.apache.lucene:lucene-queries:4.10.2 [info] | +-org.apache.lucene:lucene-core:4.10.2 ...