配置:sbt 0.13.8 sbt-dependency-graph 0.7.4
在项目中执行dependencyGraph时,它会破坏以下堆栈跟踪:
[ds-workflow_executor]> last workflowexecutor/compile:ivyReport
java.lang.IllegalStateException: sbt-dependency-graph plugin currently only supports InlineConfiguration of ivy settings (the default in sbt)
at net.virtualvoid.sbt.graph.Plugin$.crossName(Plugin.scala:206)
at net.virtualvoid.sbt.graph.Plugin$$anonfun$graphSettings$2$$anonfun$apply$1.apply(Plugin.scala:71)
at net.virtualvoid.sbt.graph.Plugin$$anonfun$graphSettings$2$$anonfun$apply$1.apply(Plugin.scala:71)
at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$1.apply(Plugin.scala:88)
at net.virtualvoid.sbt.graph.Plugin$$anonfun$ivyReportForConfig$1.apply(Plugin.scala:88)
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:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (workflowexecutor/compile:ivyReport) java.lang.IllegalStateException: sbt-dependency-graph plugin currently only supports InlineConfiguration of ivy settings (the default in sbt)
怎么解决?
最佳答案 tl; dr将sbt-dependency-graph升级到0.7.5.
原因在sbt 0.13.8 support #67中有详细描述:
This is caused by the fact that sbt 0.13.8 uses a new ModuleSettings called InlineConfigurationWithExcludes. You can test for the class name reflectively and grab the module field via structural subtyping to avoid adding dependency to sbt 0.13.8 code base. I can send a PR for this.