Giter Club home page Giter Club logo

sbt-dependency-graph's Introduction

sbt-dependency-graph

Join the chat at https://gitter.im/jrudolph/sbt-dependency-graph

Visualize your project's dependencies.

DEPRECATED: This plugin has been replaced by built-in sbt plugin in sbt 1.4+, please replace your dependency on this plugin with the following statement addDependencyTreePlugin

Note: Under sbt >= 1.3.x some features might currently not work as expected or not at all (like dependencyLicenses).

Usage Instructions

sbt-dependency-graph is an informational tool rather than one that changes your build, so you will more than likely wish to install it as a global plugin so that you can use it in any SBT project without the need to explicitly add it to each one. To do this, add the plugin dependency to ~/.sbt/0.13/plugins/plugins.sbt for sbt 0.13 or ~/.sbt/1.0/plugins/plugins.sbt for sbt 1.0:

For sbt 1.4+ use:

addDependencyTreePlugin

For sbt < 1.3 use:

addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.10.0-RC1")

To add the plugin only to a single project, put this line into project/plugins.sbt of your project, instead.

The plugin currently supports sbt versions >= 0.13.10 and sbt 1.0.x. For versions supporting older versions of sbt see the notes of version 0.8.2.

Main Tasks

  • dependencyTree: Shows an ASCII tree representation of the project's dependencies
  • dependencyBrowseGraph: Opens a browser window with a visualization of the dependency graph (courtesy of graphlib-dot + dagre-d3).
  • dependencyBrowseTree: Opens a browser window with a visualization of the dependency tree (courtesy of jstree).
  • dependencyList: Shows a flat list of all transitive dependencies on the sbt console (sorted by organization and name)
  • whatDependsOn <organization> <module> <revision>?: Find out what depends on an artifact. Shows a reverse dependency tree for the selected module. The <revision> argument is optional.
  • dependencyLicenseInfo: show dependencies grouped by declared license
  • dependencyStats: Shows a table with each module a row with (transitive) Jar sizes and number of dependencies
  • dependencyGraphMl: Generates a .graphml file with the project's dependencies to target/dependencies-<config>.graphml. Use e.g. yEd to format the graph to your needs.
  • dependencyDot: Generates a .dot file with the project's dependencies to target/dependencies-<config>.dot. Use graphviz to render it to your preferred graphic format.
  • dependencyGraph: Shows an ASCII graph of the project's dependencies on the sbt console (only supported on sbt 0.13)
  • ivyReport: Lets ivy generate the resolution report for you project. Use show ivyReport for the filename of the generated report

The following tasks also support the toFile subtask to save the contents to a file:

  • dependencyTree
  • dependencyList
  • dependencyStats
  • dependencyLicenseInfo

The toFile subtask has the following syntax:

<config>:<task>::toFile <filename> [-f|--force]

Use -f to force overwriting an existing file.

E.g. test:dependencyStats::toFile target/depstats.txt will write the output of the dependencyStats in the test configuration to the file target/depstats.txt but would not overwrite an existing file.

All tasks can be scoped to a configuration to get the report for a specific configuration. test:dependencyGraph, for example, prints the dependencies in the test configuration. If you don't specify any configuration, compile is assumed as usual.

Note: If you want to run tasks with parameters from outside the sbt shell, make sure to put the whole task invocation in quotes, e.g. sbt "whatDependsOn <org> <module> <version>".

Configuration settings

  • filterScalaLibrary: Defines if the scala library should be excluded from the output of the dependency-* functions. If true, instead of showing the dependency "[S]" is appended to the artifact name. Set to false if you want the scala-library dependency to appear in the output. (default: true)
  • dependencyGraphMLFile: a setting which allows configuring the output path of dependency-graph-ml.
  • dependencyDotFile: a setting which allows configuring the output path of dependency-dot.
  • dependencyDotHeader: a setting to customize the header of the dot file (e.g. to set your preferred node shapes).
  • dependencyDotNodeLabel: defines the format of a node label (default set to [organisation]<BR/><B>[name]</B><BR/>[version])

E.g. in build.sbt you can change configuration settings like this:

filterScalaLibrary := false // include scala library in output

dependencyDotFile := file("dependencies.dot") //render dot file to `./dependencies.dot`

Known issues

  • #19: There's an unfixed bug with graph generation for particular layouts. Workaround: Use dependency-tree instead of dependency-graph.

License

Published under the Apache License 2.0.

sbt-dependency-graph's People

Contributors

2m avatar alexbezhan avatar alkersan avatar aruediger avatar benmccann avatar berleon avatar bjaglin avatar blaisorblade avatar ches avatar chikei avatar dwijnand avatar eed3si9n avatar gitter-badger avatar gseitz avatar jatcwang avatar jaytaylor avatar jrudolph avatar leifwickland avatar masseguillaume avatar mdr avatar neko-kai avatar retronym avatar sderosiaux avatar sullis avatar xuwei-k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbt-dependency-graph's Issues

Strange behavior of "--force" parameter in playframework app

I've found this problem with my playframework 3.2.3 application.

Problem:

  • shell command "activator dependency-graph --force" gives "Not a valid command: force"
  • run "activator" then input "dependency-graph --force" gives nothing, just infinite operation
  • same results if you replase "activator" command to "sbt" command

How to reproduce:

  1. Just create empty play-scala app using activator
  2. Add dependency-graph as you described in the front page of this repo.

Rename "dependency-graph" -> "dependency-tree"

Just a quick suggestion: should "dependency-graph" be renamed "dependency-tree"? As well as being more precise, it would match the analogous maven dependency:tree goal.

Or else implement an ASCII art graph layout engine ;-)

Issue when executing 'what-depends-on' command

Hi,

I'm trying execute following command:

sbt "project my-project" what-depends-on org.scalamacros quasiquotes_2.10.3 2.0.0-M3

but I faced with following error message:

[error] Not a valid command: what-depends-on
[error] Expected whitespace character
[error] what-depends-on
[error]                ^

Symbol '^' points on the symbole after "-on".

Command "sbt "project my-project" dependency-tree" works fine.

Fix notice to use `--force` to include quotes

$ sbt dependency-graph
...
[info] Note: The graph was estimated to be too big to display (> 15 nodes). Use `dependency-graph --force` to force graph display.

$ sbt dependency-graph --force
[error] Not a valid command: force
[error] force
[error]      ^

Am I doing something wrong?

filterScalaLibrary not working for transitive dependencies

In version 0.7.4 It seems all evicted scala-library of transitive dependencies are displaying in the output, occupying a lot of screen space.

example:

[info]   +-io.spray:spray-routing-shapeless2_2.11:1.3.2
[info]   | +-com.chuusai:shapeless_2.11:2.0.0 [S]
[info]   | | +-org.scala-lang:scala-library:2.10.3 (evicted by: 2.11.4)
[info]   | | +-org.scala-lang:scala-library:2.11.0 (evicted by: 2.11.4)  
[info]   | | +-org.scala-lang:scala-library:2.11.1 (evicted by: 2.11.4)
[info]   | | +-org.scala-lang:scala-library:2.11.2 (evicted by: 2.11.4)
[info]   | |
[info]   | +-io.spray:spray-http_2.11:1.3.2
[info]   | | +-io.spray:spray-util_2.11:1.3.2
[info]   | | +-org.parboiled:parboiled-scala_2.11:1.1.6
[info]   | |   +-org.parboiled:parboiled-core:1.1.6
[info]   | |
[info]   | +-io.spray:spray-httpx_2.11:1.3.2
[info]   | | +-io.spray:spray-http_2.11:1.3.2 
[info]   | | | +-io.spray:spray-util_2.11:1.3.2
[info]   | | | +-org.parboiled:parboiled-scala_2.11:1.1.6
[info]   | | |   +-org.parboiled:parboiled-core:1.1.6
[info]   | | |
[info]   | | +-io.spray:spray-util_2.11:1.3.2
[info]   | | +-org.jvnet.mimepull:mimepull:1.9.4
[info]   | | +-org.scala-lang.modules:scala-xml_2.11:1.0.2 [S]
[info]   | |   +-org.scala-lang:scala-library:2.11.1 (evicted by: 2.11.4)
[info]   | |
[info]   | +-io.spray:spray-util_2.11:1.3.2

Figure out resolution-cache directory more intelligently

this stackoverflow hack shows how to set an ivy resolver cache that is outside the target directory and therefore immune to insane slowdown on a clean. When I do this, I set it on a per-module basis.

However, sbt dependency graph seems to be referencing the old cache directory. Is this hardcoded or is there something else I have to do to get it to use the new cache?

FileNotFoundException

I already see lots of people reported the similar issue before. Although this has been claimed to be fixed in the version prior to 0.7.4 (which is the one I am using), it still persists for my case

project foo
dependency-graph
[trace] Stack trace suppressed: run last foo/compile:module-graph for the full output.
error java.io.FileNotFoundException: /home/shengc/foo/target/resolution-cache/reports/net.foo-foo/compile-resolved.xml (No such file or directory)
[error] Total time: 10 s, completed Sep 12, 2013 9:53:18 AM

So

  1. I have a aggregated project, and I use "project foo" to go into a sub-project
  2. I am using ivy/ivysettings for dependency management

Would these 2 by any means mess the search path of this plugin?

what-depends-on shows nothing for ranged dependencies

what-depends-on org.codehaus.jackson jackson-mapper-asl 1.9.12

in a Play 2.0.4 project outputs:

[info] 
[success] Total time: 0 s, completed 28-Feb-2013 16:45:39

because the actual dependency (from jerkson) specifies a range:

./local/com.codahale/jerkson_2.9.1/0.5.0/ivys/ivy.xml:33:       <dependency org="org.codehaus.jackson" name="jackson-mapper-asl" rev="[1.9.0,2.0.0)" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>

dependency not found

Hello,

I am trying to use sbt-dependency-graph with Scala 2.10.3 and sbt 0.13.1. I have the following line in plugins.sbt:

addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4")

I get the following error message:

==== maven-proxy-releases: tried
http://xxxxxxx:2345/artifactory/all/net/virtual-void/sbt-dependency-graph_2.10_0.13/0.7.4/sbt-dependency-graph-0.7.4.pom

Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] net.virtual-void:sbt-dependency-graph:0.7.4 (sbtVersion=0.13, scalaVersion=2.10)

I am using a local Artifactory proxy which is configured to proxy http://repo1.maven.org/maven2, which hold the corresponding artifact.

I have no problem to retrieve the sbt-eclipse plugin, so I cant figure what I am doing wrong with this one.

Thanks,

Pierre-Yves

Output contains colour codes when directed to file

If I do something like the following to make browsing/searching the output easier:

sbt dependency-graph > graph.txt

I see the output similar to the following when I open the file in vi or other editor:

[0m[๏ฟฝ[0minfo๏ฟฝ[0m] ๏ฟฝ[0m  +-org.apache.spark:spark-streaming-kafka_2.10:1.1.0๏ฟฝ[0m
๏ฟฝ[0m[๏ฟฝ[0minfo๏ฟฝ[0m] ๏ฟฝ[0m  | +-org.apache.kafka:kafka_2.10:0.8.0 [S]๏ฟฝ[0m
๏ฟฝ[0m[๏ฟฝ[0minfo๏ฟฝ[0m] ๏ฟฝ[0m  | | +-com.101tec:zkclient:0.3๏ฟฝ[0m
๏ฟฝ[0m[๏ฟฝ[0minfo๏ฟฝ[0m] ๏ฟฝ[0m  | | | +-log4j:log4j:1.2.14 (evicted by: 1.2.17)๏ฟฝ[0m
๏ฟฝ[0m[๏ฟฝ[0minfo๏ฟฝ[0m] ๏ฟฝ[0m  | | | +-log4j:log4j:1.2.15 (evicted by: 1.2.17)๏ฟฝ[0m
๏ฟฝ[0m[๏ฟฝ[0minfo๏ฟฝ[0m] ๏ฟฝ[0m  | | | +-log4j:log4j:1.2.16 (evicted by: 1.2.17)๏ฟฝ[0m
๏ฟฝ[0m[๏ฟฝ[0minfo๏ฟฝ[0m] ๏ฟฝ[0m  | | | +-log4j:log4j:1.2.17๏ฟฝ[0m
๏ฟฝ[0m[๏ฟฝ[0minfo๏ฟฝ[0m] ๏ฟฝ[0m  | | | ๏ฟฝ[0m

It looks like the output contains console colour codes. As a workaround I can strip them using something like this:

sbt dependency-graph | perl -pe 's/\e\[?.*?[\@-~]//g' > graph.txt

(as per this answer) which gives me the expected output:

[info]   +-org.apache.spark:spark-streaming-kafka_2.10:1.1.0
[info]   | +-org.apache.kafka:kafka_2.10:0.8.0 [S]
[info]   | | +-com.101tec:zkclient:0.3
[info]   | | | +-log4j:log4j:1.2.14 (evicted by: 1.2.17)
[info]   | | | +-log4j:log4j:1.2.15 (evicted by: 1.2.17)
[info]   | | | +-log4j:log4j:1.2.16 (evicted by: 1.2.17)
[info]   | | | +-log4j:log4j:1.2.17
[info]   | | | 
[info]   | | +-com.

This is using bash on MacOSX Yosemite, btw.

New user issues

For SBT 0.11, instead of project/plugins/project/build.scala do you instead mean project/project/build.scala?

The docs say:

Then, add the following in your build.sbt:

net.virtualvoid.sbt.graph.Plugin.graphSettings

This is what I get when I put in project/build.sbt:

sbt
[info] Loading global plugins from /home/mslinn/.sbt/plugins
[info] Loading project definition from /home/mslinn/work/bookish/domain-bus/project/project
[info] Loading project definition from /home/mslinn/.sbt/staging/056702a3a93cae0f5dc5/project
/home/mslinn/work/bookish/domain-bus/project/build.sbt:1: error: not found: value net
net.virtualvoid.sbt.graph.Plugin.graphSettings
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

When I put build.sbt in the project root, the error did not appear, but the dependency-graph command was not available.

StringIndexOutOfBoundsException on both tree and graph

[trace] Stack trace suppressed: run last compile:dependency-tree-string for the full output.
error java.lang.StringIndexOutOfBoundsException: String index out of range: 168
[error] Total time: 3 s, completed May 20, 2013 11:09:51 PM

last compile:dependency-tree-string
java.lang.StringIndexOutOfBoundsException: String index out of range: 168
at java.lang.String.charAt(String.java:686)
at scala.collection.immutable.StringOps.apply(StringOps.scala:39)
at sbt.Graph$.insertBar$1(SettingGraph.scala:67)
at sbt.Graph$$anonfun$4$$anonfun$apply$6.apply(SettingGraph.scala:77)
at sbt.Graph$$anonfun$4$$anonfun$apply$6.apply(SettingGraph.scala:77)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.immutable.VectorIterator.foreach(Vector.scala:648)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
at scala.collection.immutable.Vector.foreach(Vector.scala:63)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
at scala.collection.immutable.Vector.map(Vector.scala:63)
at sbt.Graph$$anonfun$4.apply(SettingGraph.scala:77)
at sbt.Graph$$anonfun$4.apply(SettingGraph.scala:76)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:239)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:239)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.immutable.VectorIterator.foreach(Vector.scala:648)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
at scala.collection.immutable.Vector.foreach(Vector.scala:63)
at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:239)
at scala.collection.immutable.Vector.flatMap(Vector.scala:63)
at sbt.Graph$.toAsciiLines$1(SettingGraph.scala:76)
at sbt.Graph$$anonfun$3.apply(SettingGraph.scala:75)
at sbt.Graph$$anonfun$3.apply(SettingGraph.scala:75)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.immutable.VectorIterator.foreach(Vector.scala:648)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
at scala.collection.immutable.Vector.foreach(Vector.scala:63)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
at scala.collection.immutable.Vector.map(Vector.scala:63)
at sbt.Graph$.toAsciiLines$1(SettingGraph.scala:75)
at sbt.Graph$$anonfun$3.apply(SettingGraph.scala:75)
at sbt.Graph$$anonfun$3.apply(SettingGraph.scala:75)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)

SBT 0.12.1

I can't seem to get it working with SBT 0.12.1. It could be a bug with SBT, since when running ivy-report I can't find the file it wrote.

> dependency-graph
[trace] Stack trace suppressed: run last compile:dependency-graph-string for the full output.
[error] (compile:dependency-graph-string) java.io.FileNotFoundException: /home/mathias/.ivy2/cache/io.theysay-moodraker-core_2.9.2-compile.xml (No such file or directory)
[error] Total time: 0 s, completed 19-Oct-2012 14:01:02
> 

Examples of how to configure

Please include an example or two of how to use the configuration options. e.g. how to set filter-scala-library=false - in the build.sbt or as a command-line argument?

Make 'dependency-graph' tolerate missing dependencies, show partial graph

I have recently got an unmet transitive dependency on 'javax.transaction#jta;1.0.1B!jta.jar' in my SBT project, that's causing problems. I don't yet know what has caused me to depend upon this artefact, as it appeared during a Scala version upgrade.

I installed the sbt-dependency-graph plugin in the hope that it could help me diagnose my problem. But unfortunately, the missing library prevents the 'dependency-graph' command from running, which is the very thing I need to fix the situation.

I can imagine an alternative way of handling missing dependencies during 'dependency-graph', where only the potion of the graph that can be resolved is displayed. That way, I hope, I might see a path to 'javax.transaction#jta;1.0.1B!jta.jar', and then a message that it could not be resolved further.

Is that behavior practical?

The ASCII graphs dependency seems to have disappeared from the repository.

๏ฟฝ[๏ฟฝwarn๏ฟฝ] ๏ฟฝ ::::::::::::::::::::::::::::::::::::::::::::::๏ฟฝ
๏ฟฝ[๏ฟฝwarn๏ฟฝ] ๏ฟฝ :: FAILED DOWNLOADS ::๏ฟฝ
๏ฟฝ[๏ฟฝwarn๏ฟฝ] ๏ฟฝ :: ^ see resolution messages for details ^ ::๏ฟฝ
๏ฟฝ[๏ฟฝwarn๏ฟฝ] ๏ฟฝ ::::::::::::::::::::::::::::::::::::::::::::::๏ฟฝ
๏ฟฝ[๏ฟฝwarn๏ฟฝ] ๏ฟฝ :: com.github.mdr#ascii-graphs_2.9.2;0.0.2!ascii-graphs_2.9.2.jar๏ฟฝ
๏ฟฝ[๏ฟฝwarn๏ฟฝ] ๏ฟฝ ::::::::::::::::::::::::::::::::::::::::::::::๏ฟฝ
sbt.ResolveException: download failed: com.github.mdr#ascii-graphs_2.9.2;0.0.2!ascii-graphs_2.9.2.jar

Dependency graph is 0.7.0-RC1 contains dup dependencies

When I define e.g. SLF4J 1.7.2 and Logback 1.0.7 in the same project (SBT 0.12.1), I get the following output:

[info]   +-ch.qos.logback:logback-classic:1.0.7
[info]   | +-ch.qos.logback:logback-core:1.0.7
[info]   | +-org.slf4j:slf4j-api:1.6.6
[info]   | +-org.slf4j:slf4j-api:1.7.2
[info]   | 
[info]   +-com.fasterxml.jackson.core:jackson-databind:2.1.0
[info]   | +-com.fasterxml.jackson.core:jackson-annotations:2.1.0
[info]   | +-com.fasterxml.jackson.core:jackson-core:2.1.0
[info]   | 
[info]   +-com.novus:salat_2.9.2:1.9.2-SNAPSHOT
[info]   | +-com.novus:salat-core_2.9.2:1.9.2-SNAPSHOT
[info]   | | +-com.novus:salat-util_2.9.2:1.9.2-SNAPSHOT
[info]   | | | +-org.scala-lang:scala-library:2.9.2
[info]   | | | +-org.scala-lang:scalap:2.9.2
[info]   | | | | +-org.scala-lang:scala-compiler:2.9.2
[info]   | | | |   +-org.scala-lang:scala-library:2.9.2
[info]   | | | |   
[info]   | | | +-org.slf4j:slf4j-api:1.6.4
[info]   | | | +-org.slf4j:slf4j-api:1.7.2
[info]   | | | 
[info]   | | +-net.liftweb:lift-json_2.9.2:2.5-M1
[info]   | | | +-com.thoughtworks.paranamer:paranamer:2.4.1
[info]   | | | +-org.scala-lang:scala-library:2.9.2
[info]   | | | +-org.scala-lang:scalap:2.9.2
[info]   | | |   +-org.scala-lang:scala-compiler:2.9.2
[info]   | | |     +-org.scala-lang:scala-library:2.9.2
[info]   | | |     
[info]   | | +-org.mongodb:casbah_2.9.2:2.4.1
[info]   | | | +-org.mongodb:casbah-commons_2.9.2:2.4.1
[info]   | | | | +-org.mongodb:casbah-util_2.9.2:2.4.1
[info]   | | | | | +-org.mongodb:mongo-java-driver:2.8.0
[info]   | | | | | +-org.scala-lang:scala-library:2.9.2
[info]   | | | | | +-org.scala-tools.time:time_2.9.1:0.5
[info]   | | | | | | +-joda-time:joda-time:1.6.2
[info]   | | | | | | +-joda-time:joda-time:2.0
[info]   | | | | | | +-org.scala-lang:scala-library:2.9.2
[info]   | | | | | | 
[info]   | | | | | +-org.scalaj:scalaj-collection_2.9.1:1.2
[info]   | | | | | | +-org.scala-lang:scala-library:2.9.2
[info]   | | | | | | 
[info]   | | | | | +-org.slf4j:slf4j-api:1.6.0
[info]   | | | | | +-org.slf4j:slf4j-api:1.6.4
[info]   | | | | | +-org.slf4j:slf4j-api:1.7.2
[info]   | | | | | +-org.specs2:specs2_2.9.2:1.10
[info]   | | | | |   +-org.specs2:specs2-scalaz-core_2.9.2:6.0.1
[info]   | | | | |     +-org.scala-lang:scala-library:2.9.2
[info]   | | | | |     
[info]   | | | | +-org.mongodb:mongo-java-driver:2.8.0
[info]   | | | | +-org.scala-lang:scala-library:2.9.2
[info]   | | | | +-org.scala-tools.time:time_2.9.1:0.5
[info]   | | | | | +-joda-time:joda-time:1.6.2
[info]   | | | | | +-joda-time:joda-time:2.0
[info]   | | | | | +-org.scala-lang:scala-library:2.9.2
[info]   | | | | | 
[info]   | | | | +-org.scalaj:scalaj-collection_2.9.1:1.2
[info]   | | | | | +-org.scala-lang:scala-library:2.9.2
[info]   | | | | | 
[info]   | | | | +-org.slf4j:slf4j-api:1.6.0
[info]   | | | | +-org.slf4j:slf4j-api:1.7.2
[info]   | | | | +-org.specs2:specs2_2.9.2:1.10
[info]   | | | |   +-org.specs2:specs2-scalaz-core_2.9.2:6.0.1
[info]   | | | |     +-org.scala-lang:scala-library:2.9.2
[info]   | | | |     
[info]   | | | +-org.mongodb:casbah-core_2.9.2:2.4.1
[info]   | | | | +-org.mongodb:casbah-commons_2.9.2:2.4.1
[info]   | | | | | +-org.mongodb:casbah-util_2.9.2:2.4.1
[info]   | | | | | | +-org.mongodb:mongo-java-driver:2.8.0
[info]   | | | | | | +-org.scala-lang:scala-library:2.9.2
[info]   | | | | | | +-org.scala-tools.time:time_2.9.1:0.5
[info]   | | | | | | | +-joda-time:joda-time:1.6.2
[info]   | | | | | | | +-joda-time:joda-time:2.0
[info]   | | | | | | | +-org.scala-lang:scala-library:2.9.2
[info]   | | | | | | | 
[info]   | | | | | | +-org.scalaj:scalaj-collection_2.9.1:1.2
[info]   | | | | | | | +-org.scala-lang:scala-library:2.9.2
[info]   | | | | | | | 
[info]   | | | | | | +-org.slf4j:slf4j-api:1.6.0
[info]   | | | | | | +-org.slf4j:slf4j-api:1.6.4
[info]   | | | | | | +-org.slf4j:slf4j-api:1.7.2
[info]   | | | | | | +-org.specs2:specs2_2.9.2:1.10
[info]   | | | | | |   +-org.specs2:specs2-scalaz-core_2.9.2:6.0.1
[info]   | | | | | |     +-org.scala-lang:scala-library:2.9.2
[info]   | | | | | |     
[info]   | | | | | +-org.mongodb:mongo-java-driver:2.8.0
[info]   | | | | | +-org.scala-lang:scala-library:2.9.2
[info]   | | | | | +-org.scala-tools.time:time_2.9.1:0.5
[info]   | | | | | | +-joda-time:joda-time:1.6.2
[info]   | | | | | | +-joda-time:joda-time:2.0
[info]   | | | | | | +-org.scala-lang:scala-library:2.9.2

failure to resolve sbt-dependency-graph-0.7.4

When attempting to resolve sbt-dependency-graph-0.7.4 I receive the following errors:

[error] Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://oss.sonatype.org/content/repositories/netvirtual-void-1001/net/virtual-void/sbt-dependency-graph_2.9.2_0.12/0.7.4/sbt-dependency-graph-0.7.4.pom
[error] Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://oss.sonatype.org/content/repositories/netvirtual-void-1001/net/virtual-void/sbt-dependency-graph/0.7.4/sbt-dependency-graph-0.7.4.jar

doesn't work with scala 2.11?

I see

$ sbt "dependency-graph"
[info] Loading project definition from /Users/jankowalski/projects/4fin/perfomance/project
[info] Set current project to perfomance (in build file:/Users/jankowalski/projects/4fin/perfomance/)
[error] Not a valid command: dependency-graph
[error] Not a valid project ID: dependency-graph
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: dependency-graph (similar: dependency-classpath, dependencyClasspath, dependency-overrides)
[error] dependency-graph
[error]                 ^

having build.properties

sbt.version=0.13.7

and build.sbt:

scalaVersion := "2.11.4"

and plugins.sbt:

addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4") 

Cache problems with sbt 0.13.7

I'm trying to run dependency-dot on my project Mellite. If I change project/build.properties from 0.13.6 to 0.13.7, I get the following error:

[success] Total time: 1 s, completed Dec 6, 2014 12:31:47 AM
[info] Updating {file:/home/hhrutz/Documents/devel/Mellite/}mellite-core...
[info] Updating {file:/home/hhrutz/Documents/devel/Mellite/}mellite-core...
[info] Resolving com.github.scopt#scopt_2.11;3.2.0 ...
[info] Done updating.
[info] Resolving com.github.scopt#scopt_2.11;3.2.0 ...
[info] Updating {file:/home/hhrutz/Documents/devel/Mellite/}mellite-views...
[info] Updating {file:/home/hhrutz/Documents/devel/Mellite/}mellite-views...
[info] Done updating.
[info] Resolving de.sciss#numbers_2.11;0.1.1 ...
[info] Wrote dependency graph to '/home/hhrutz/Documents/devel/Mellite/core/target/dependencies-compile.dot'
[info] Resolving de.sciss#weblaf-ui;1.28 ...
[info] Done updating.
[info] Resolving de.sciss#weblaf-ui;1.28 ...
[info] Done updating.
[info] Updating {file:/home/hhrutz/Documents/devel/Mellite/}mellite...
[info] Resolving de.sciss#weblaf-ui;1.28 ...
[info] Done updating.
[info] Wrote dependency graph to '/home/hhrutz/Documents/devel/Mellite/target/dependencies-compile.dot'
java.io.FileNotFoundException: /home/hhrutz/Documents/devel/Mellite/views/target/resolution-cache/reports/de.sciss-mellite-views_2.11-compile.xml (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:146)
    at scala.io.Source$.fromFile(Source.scala:90)
    at scala.io.Source$.fromFile(Source.scala:75)
    at scala.io.Source$.fromFile(Source.scala:53)
    at net.virtualvoid.sbt.graph.IvyGraphMLDependencies$.buildDoc(IvyGraphMLDependencies.scala:224)
    at net.virtualvoid.sbt.graph.IvyGraphMLDependencies$.graph(IvyGraphMLDependencies.scala:70)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$2.apply(Plugin.scala:89)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$2.apply(Plugin.scala:89)
    at scala.Function1$$anonfun$andThen$1.apply(Function1.scala:55)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[error] (mellite-views/compile:moduleGraph) java.io.FileNotFoundException: /home/hhrutz/Documents/devel/Mellite/views/target/resolution-cache/reports/de.sciss-mellite-views_2.11-compile.xml (No such file or directory)
[error] Total time: 9 s, completed Dec 6, 2014 12:31:57 AM

I don't know if this is a bug of sbt or sbt-dependency-graph. Given that 0.13.7 claims to have improved caching, my guess is the former, but perhaps you can take a look at this issue.

Global plugin

I don't know if this is something about the plugin, or I'm doing something wrong, but I can't seem to make it work by putting the information in the readme in ~/.sbt/plugins/depgraph.sbt. I'd also like to include the settings ~/.sbt/something.sbt.
Thanks.

ivy-report returns wrong path to report in sbt 0.12.1

Both 0.6.0 and 0.7.0 stopped working for me with sbt 0.12.1. Internally it seems confused about where the ivy report is generated.

The docs say that it should be in /target/resolution-cache/reports/.
And when I inspect the file system, that's where it is:

$ sbt
svc-waitlist-broker> clean
[success] Total time: 0 s, completed Oct 25, 2012 10:10:11 AM
svc-waitlist-broker> show ivy-report
[info] /Users/ebowman/.ivy2/cache/com.giltgroupe-svc-waitlist-broker-compile.xml
[success] Total time: 4 s, completed Oct 25, 2012 10:10:19 AM
svc-waitlist-broker> 
...
$ ls -l target/resolution-cache/reports/com.giltgroupe-svc-waitlist-broker/compile-resolved.xml 
-rw-r--r--  1 ebowman  CORP\Domain Users  62937 Oct 25 10:10 target/resolution-cache/reports/com.giltgroupe-svc-waitlist-broker/compile-resolved.xml

After this all the other stuff fails, because it looks in the wrong place for the report:

$ sbt dependency-graph
java.io.FileNotFoundException: /Users/ebowman/.ivy2/cache/com.giltgroupe-svc-waitlist-broker-compile.xml (No such file or directory)

Is this a bug in the plugin, or am I somehow misconfiguring it?

Thanks...

Another StringIndexOutOfBoundsException for deep graphs

As reported at the end of #32:

java.lang.StringIndexOutOfBoundsException: String index out of range: 146
at java.lang.String.charAt(String.java:658)
 at scala.collection.immutable.StringOps.apply(StringOps.scala:39)
at net.virtualvoid.sbt.graph.Graph$.insertBar$1(Graph.scala:27)
 at
net.virtualvoid.sbt.graph.Graph$$anonfun$2$$anonfun$apply$1.apply(Graph.scala:37)
at
net.virtualvoid.sbt.graph.Graph$$anonfun$2$$anonfun$apply$1.apply(Graph.scala:37)
 at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
 at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.immutable.VectorIterator.foreach(Vector.scala:648)
 at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
at scala.collection.immutable.Vector.foreach(Vector.scala:63)
 at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
at scala.collection.immutable.Vector.map(Vector.scala:63)
 at net.virtualvoid.sbt.graph.Graph$$anonfun$2.apply(Graph.scala:37)
at net.virtualvoid.sbt.graph.Graph$$anonfun$2.apply(Graph.scala:36)
 at
scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:239)
at
scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:239)

...


at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.immutable.VectorIterator.foreach(Vector.scala:648)
 at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
at scala.collection.immutable.Vector.foreach(Vector.scala:63)
 at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
at scala.collection.immutable.Vector.map(Vector.scala:63)
 at net.virtualvoid.sbt.graph.Graph$.toAsciiLines$1(Graph.scala:35)
at net.virtualvoid.sbt.graph.Graph$.toAscii(Graph.scala:45)
 at
net.virtualvoid.sbt.graph.IvyGraphMLDependencies$$anonfun$asciiTree$1.apply(IvyGraphMLDependencies.scala:147)
at
net.virtualvoid.sbt.graph.IvyGraphMLDependencies$$anonfun$asciiTree$1.apply(IvyGraphMLDependencies.scala:146)
 at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
 at
scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:76)
 at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
at scala.collection.immutable.List.map(List.scala:76)
 at
net.virtualvoid.sbt.graph.IvyGraphMLDependencies$.asciiTree(IvyGraphMLDependencies.scala:146)
at
net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$6.apply(Plugin.scala:113)
 at
net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$6.apply(Plugin.scala:113)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
 at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
 at sbt.std.Transform$$anon$5.work(System.scala:71)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
 at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
 at sbt.Execute.work(Execute.scala:238)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
 at
sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
 at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
[error] (compile:dependency-tree-string)
java.lang.StringIndexOutOfBoundsException: String index out of range: 146

Combined graph of multimodule project

If I have a multimodule project, is there a way of creating a combined graph of all the dependencies of the entire project? If there's a single root, this is easy, but sometimes you have multiple...

ArrayIndexOutOfBoundsException when using dependency-graph --force

> last compile:dependency-graph
java.lang.RuntimeException: Problem drawing segment EdgeSegment(Point(17,31),Down,Point(18,31)) in edge EdgeDrawingElement(List(Point(5,147), Point(7,147), Point(7,63), Point(17,63), Point(17,31), Point(18,31), Point(18,7), Point(56,7)),false,true)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$com$github$mdr$ascii$layout$Renderer$$render$4.apply(Renderer.scala:122)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$com$github$mdr$ascii$layout$Renderer$$render$4.apply(Renderer.scala:113)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at com.github.mdr.ascii.layout.Renderer.com$github$mdr$ascii$layout$Renderer$$render(Renderer.scala:113)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$render$1.apply(Renderer.scala:158)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$render$1.apply(Renderer.scala:156)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at com.github.mdr.ascii.layout.Renderer.render(Renderer.scala:156)
    at com.github.mdr.ascii.layout.Renderer$.render(Renderer.scala:72)
    at com.github.mdr.ascii.layout.Layouter$.renderGraph(Layout.scala:14)
    at net.virtualvoid.sbt.graph.IvyGraphMLDependencies$.asciiGraph(IvyGraphMLDependencies.scala:94)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4$$anonfun$apply$5.apply(Plugin.scala:77)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4$$anonfun$apply$5.apply(Plugin.scala:77)
    at sbt.MultiLogger.log(MultiLogger.scala:31)
    at sbt.Logger$class.info(Logger.scala:98)
    at sbt.AbstractLogger.info(Logger.scala:11)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4.apply(Plugin.scala:77)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4.apply(Plugin.scala:75)
    at sbt.Scoped$$anonfun$hf3$1.apply(Structure.scala:579)
    at sbt.Scoped$$anonfun$hf3$1.apply(Structure.scala:579)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
    at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
    at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
    at sbt.std.Transform$$anon$5.work(System.scala:71)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:238)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 62
    at com.github.mdr.ascii.layout.Renderer$Grid.update(Renderer.scala:85)
    at com.github.mdr.ascii.layout.Renderer.com$github$mdr$ascii$layout$Renderer$$drawLine(Renderer.scala:102)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$com$github$mdr$ascii$layout$Renderer$$render$4.apply(Renderer.scala:120)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$com$github$mdr$ascii$layout$Renderer$$render$4.apply(Renderer.scala:113)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at com.github.mdr.ascii.layout.Renderer.com$github$mdr$ascii$layout$Renderer$$render(Renderer.scala:113)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$render$1.apply(Renderer.scala:158)
    at com.github.mdr.ascii.layout.Renderer$$anonfun$render$1.apply(Renderer.scala:156)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at com.github.mdr.ascii.layout.Renderer.render(Renderer.scala:156)
    at com.github.mdr.ascii.layout.Renderer$.render(Renderer.scala:72)
    at com.github.mdr.ascii.layout.Layouter$.renderGraph(Layout.scala:14)
    at net.virtualvoid.sbt.graph.IvyGraphMLDependencies$.asciiGraph(IvyGraphMLDependencies.scala:94)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4$$anonfun$apply$5.apply(Plugin.scala:77)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4$$anonfun$apply$5.apply(Plugin.scala:77)
    at sbt.MultiLogger.log(MultiLogger.scala:31)
    at sbt.Logger$class.info(Logger.scala:98)
    at sbt.AbstractLogger.info(Logger.scala:11)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4.apply(Plugin.scala:77)
    at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$4$$anonfun$apply$4.apply(Plugin.scala:75)
    at sbt.Scoped$$anonfun$hf3$1.apply(Structure.scala:579)
    at sbt.Scoped$$anonfun$hf3$1.apply(Structure.scala:579)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)

Can't run dependency-dot

I may be doing something wrong, but I can't use dependency-dot nor a few other tasks. I cloned the sample and upgraded the plugin to 0.7.0.

dependency-dot
[error] Not a valid command: dependency-dot
[error] Not a valid project ID: dependency-dot
[error] Not a valid configuration: dependency-dot
[error] Not a valid key: dependency-dot (similar: dependency-tree, dependency-graph, dependency-classpath)
[error] dependency-dot
[error]

The dependency-graph task works just fine.

not working with sbt 0.12.3

0.12.3 switched to using Ivy's default name for the resolution report which breaks sbt-dependency-graph:

java.io.FileNotFoundException: .../target/resolution-cache/reports/com.acme-integrationtests/compile-resolved.xml (No such file or directory)

Would like to use this plugin with SBT 0.11.0

Hi, any chance you could publish this plugin for SBT 0.11.0 as well?
Seems as if currently it is only published for 0.11.1.
From maven repo:

net.virtualvoid sbt-dependency-graph_2.9.1_0.11.1 0.5.1

Doesn't work with -Yno-generic-signatures

Probably not a bug but I think it would be worth mentioning in the README so that people know not to use the flag.

Using -Yno-generic-signatures causes an issue in deserialisation. Here's an example project:

build.sbt

scalaVersion := "2.10.3"

libraryDependencies += "org.json4s" %% "json4s-jackson" % "3.2.7"

libraryDependencies <+= scalaVersion("org.scala-lang" % "scalap" % _)

scalacOptions += "-Yno-generic-signatures"

Main.scala

object Main {
    case class X(email: String, url: Option[String])

  def main(a: Array[String]): Unit = {

      import org.json4s._
      import org.json4s.jackson.Serialization
      import org.json4s.jackson.Serialization.{read, write}
      implicit val formats: Formats = Serialization.formats(NoTypeHints)
      val a = write(X("asd", None)); println(a); println(read[X](a))
      val b = write(X("asd", Some("yo"))); println(b); println(read[X](b))

  }

Output of sbt run:

[info] Running Main 
{"email":"asd"}
X(asd,None)
{"email":"asd","url":"yo"}
[error] (run-main-0) org.json4s.package$MappingException: unknown error
org.json4s.package$MappingException: unknown error
    at org.json4s.Extraction$.extract(Extraction.scala:46)
    at org.json4s.ExtractableJsonAstNode.extract(ExtractableJsonAstNode.scala:21)
    at org.json4s.jackson.Serialization$.read(Serialization.scala:50)
    at Main$.main(Main.scala:11)
    at Main.main(Main.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
Caused by: java.util.NoSuchElementException: head of empty list
    at scala.collection.immutable.Nil$.head(List.scala:337)
    at scala.collection.immutable.Nil$.head(List.scala:334)
    at org.json4s.Extraction$.extract(Extraction.scala:312)
    at org.json4s.Extraction$ClassInstanceBuilder.org$json4s$Extraction$ClassInstanceBuilder$$buildCtorArg(Extraction.scala:431)
    at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$14.apply(Extraction.scala:463)
    at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$14.apply(Extraction.scala:463)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    at scala.collection.AbstractTraversable.map(Traversable.scala:105)
    at org.json4s.Extraction$ClassInstanceBuilder.org$json4s$Extraction$ClassInstanceBuilder$$instantiate(Extraction.scala:451)
    at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$result$6.apply(Extraction.scala:491)
    at org.json4s.Extraction$ClassInstanceBuilder$$anonfun$result$6.apply(Extraction.scala:488)
    at org.json4s.Extraction$.org$json4s$Extraction$$customOrElse(Extraction.scala:500)
    at org.json4s.Extraction$ClassInstanceBuilder.result(Extraction.scala:488)
    at org.json4s.Extraction$.extract(Extraction.scala:332)
    at org.json4s.Extraction$.extract(Extraction.scala:42)
    at org.json4s.ExtractableJsonAstNode.extract(ExtractableJsonAstNode.scala:21)
    at org.json4s.jackson.Serialization$.read(Serialization.scala:50)
    at Main$.main(Main.scala:11)
    at Main.main(Main.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)

test dependencies

I'd like to see a dependency tree of my tests as well as the compile - is that possible?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.