I need to list all sbt dependencies in order to check if already exists a debian package (I also notice that there is a DEB package but it seems that external dependencies are not packaged).
At the moment I did a list of sbt dependencies with the following steps:
Install sbt manually
I created a simple script that extract all jar files in ~/.ivi2 directory (excluding sbt jar). Here the result of the execution:
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
Do you think is the right way to list all sbt dependencies?
All new SBT versions (after 0.7. x ) by default put the downloaded JARS into the . ivy2 directory in your home directory. If you are using Linux, this is usually /home/<username>/.
Library dependencies can be added in two ways: unmanaged dependencies are jars dropped into the lib directory. managed dependencies are configured in the build definition and downloaded automatically from repositories.
You can use both managed and unmanaged dependencies in your SBT projects. If you have JAR files (unmanaged dependencies) that you want to use in your project, simply copy them to the lib folder in the root directory of your SBT project, and SBT will find them automatically.
There is a nice sbt plugin
for that:
https://github.com/jrudolph/sbt-dependency-graph
Simply adding to ~/.sbt/0.13/plugins/plugins.sbt
:
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.8.0")
Calling sbt dependencyTree
you can get an "ascii graph" like:
...
[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
...
In case the dependency hierarchy provided by sbt-dependency-graph
is not needed, the following might be useful:
sbt 'show dependencyClasspathFiles'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With