Dependecy problems
I have been having some difficulties figuring out what depends on what. I found the following set plugins which I think can be really helpful;
https://github.com/jrudolph/sbt-dependency-graph
and
https://github.com/gilt/sbt-dependency-graph-sugar
Be sure to install GraphWiz first, I used Homebrew on my Mac
brew install graphviz
and I also had to create a config file
1 2 |
mkdir ~/.sbt/gilt vi ~/.sbt/gilt/sbt-dependency-graph-sugar-cmd |
with the following content
1 |
open -a Safari $1 |
The readme explains how to use it pretty well, simply start sbt CLI
1 2 3 4 5 6 7 8 9 10 |
Tobiass-MBP:projectX tobias$ sbt [info] Loading global plugins from /Users/tobias/.sbt/0.13/plugins [info] Updating {file:/Users/tobias/.sbt/0.13/plugins/}global-plugins... Waiting for lock on /Users/tobias/.ivy2/.sbt.ivy.lock to be available... [info] Resolving org.fusesource.jansi#jansi;1.4 ... [info] Done updating. [info] Loading project definition from /Users/tobias/qvantel/projectX/project Waiting for lock on /Users/tobias/.ivy2/.sbt.ivy.lock to be available... [info] Set current project to projectX (in build file:/Users/tobias/qvantel/projectX/) > dependencySvgView |
It will give you a graph that looks something like this (it is in SVG format so it is searchable!!!) Now you should see which package/jar is using which, and also where the different versions clash…
Show the class path for the run command
1 2 3 4 5 6 7 8 9 10 11 12 |
Tobiass-MBP:projectX tobias$ sbt [info] Loading global plugins from /Users/tobias/.sbt/0.13/plugins [info] Loading project definition from /Users/tobias/qvantel/projectX/project [info] Set current project to projectX (in build file:/Users/tobias/qvantel/projectX/) > show runtime:fullClasspath [info] Updating {file:/Users/tobias/qvantel/projectX/}projectx... [info] Resolving jline#jline;2.12.1 ... [info] Done updating. [info] List(Attributed(/Users/tobias/qvantel/projectX/target/scala-2.11/classes), Attributed(/Users/tobias/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.7.jar), Attributed(/Users/tobias/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.7.10.jar), Attributed(/Users/tobias/.ivy2/cache/ch.qos.logback/logback-core/jars/logback-core-1.1.3.jar), Attributed(/Users/tobias/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-classic-1.1.3.jar), Attributed(/Users/tobias/.ivy2/cache/io.kamon/kamon-core_2.11/jars/kamon-core_2.11-0.5.2.jar), Attributed(/Users/tobias/.ivy2/cache/com.typesafe.akka/akka-actor_2.11/jars/akka-actor_2.11-2.3.14.jar), Attributed(/Users/tobias/.ivy2/cache/com.typesafe/config/bundles/config-1.2.1.jar), Attributed(/Users/tobias/.ivy2/cache/org.hdrhistogram/HdrHistogram/bundles/HdrHistogram-2.1.7.jar), Attributed(/Users/tobias/.ivy2/cache/io.kamon/kamon-akka_2.11/jars/kamon-akka_2.11-0.5.2.jar), Attributed(/Users/tobias/.ivy2/cache/io.kamon/kamon-scala_2.11/jars/kamon-scala_2.11-0.5.2.jar), Attributed(/Users/tobias/.ivy2/cache/io.kamon/kamon-spray_2.11/jars/kamon-spray_2.11-0.5.2.jar), Attributed(/Users/tobias/.ivy2/cache/io.spray/spray-can_2.11/bundles/spray-can_2.11-1.3.3.jar), Attributed(/Users/tobias/.ivy2/cache/io.spray/spray-io_2.11/bundles/spray-io_2.11-1.3.3.jar), Attributed(/Users/tobias/.ivy2/cache/io.spray/spray-util_2.11/bundles/spray-util_2.11-1.3.3.jar), Attributed(/Users/tobias/.ivy2/cache/io.spray/spray-http_2.11/bundles/spray-http_2.11-1.3.3.jar), Attributed(/Users/tobias/.ivy2/cache/org.parboiled/parboiled-scala_2.11/jars/parboiled-scala_2.11-1.1.7.jar), Attributed(/Users/tobias/.ivy2/cache/org.parboiled/parboiled-core/jars/parboiled-core-1.1.7.jar), Attributed(/Users/tobias/.ivy2/cache/io.spray/spray-client_2.11/bundles/spray-client_2.11-1.3.3.jar), Attributed(/Users/tobias/.ivy2/cache/io.spray/spray-httpx_2.11/bundles/spray-httpx_2.11-1.3.3.jar), Attributed(/Users/tobias/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.3.jar), Attributed(/Users/tobias/.ivy2/cache/org.jvnet.mimepull/mimepull/jars/mimepull-1.9.5.jar), Attributed(/Users/tobias/.ivy2/cache/io.spray/spray-routing_2.11/bundles/spray-routing_2.11-1.3.3.jar), Attributed(/Users/tobias/.ivy2/cache/com.chuusai/shapeless_2.11/jars/shapeless_2.11-1.2.4.jar), Attributed(/Users/tobias/.ivy2/cache/org.aspectj/aspectjweaver/jars/aspectjweaver-1.8.7.jar)) [success] Total time: 1 s, completed Nov 5, 2015 10:21:30 AM > > |
Thank you! I constanly needed to write on my website something like that. Can i include a fragment of your post to my website ?