无法解析依赖关系com.geirsson#sbt-scalafmt; 1.1.0

时间:2017-07-29 07:01:39

标签: sbt

我想通过sbt下载com.geirsson#sbt-scalafmt; 1.1.0

我在plugins.sbt中添加了sbt-scalafmt依赖项,如下所示:

addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.1.0")

但是在运行sbt

时出现UNRESOLVED DEPENDENCIES错误
Resolving com.geirsson#sbt-scalafmt;1.1.0 ...
[warn]  module not found: com.geirsson#sbt-scalafmt;1.1.0
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/com.geirsson/sbt-scalafmt/scala_2.10/sbt_0.13/1.1.0/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.geirsson/sbt-scalafmt/scala_2.10/sbt_0.13/1.1.0/ivys/ivy.xml
[warn] ==== local: tried
[warn]   /Users/salonivithalani/.ivy2/local/com.geirsson/sbt-scalafmt/scala_2.10/sbt_0.13/1.1.0/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/geirsson/sbt-scalafmt_2.10_0.13/1.1.0/sbt-scalafmt-1.1.0.pom
[warn] ==== local-preloaded-ivy: tried
[warn]   /Users/salonivithalani/.sbt/preloaded/com.geirsson/sbt-scalafmt/1.1.0/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn]   file:////Users/salonivithalani/.sbt/preloaded/com/geirsson/sbt-scalafmt_2.10_0.13/1.1.0/sbt-scalafmt-1.1.0.pom
[warn] ==== bintray-scalameta-maven: tried
[warn]   https://dl.bintray.com/scalameta/maven/com/geirsson/sbt-scalafmt_2.10_0.13/1.1.0/sbt-scalafmt-1.1.0.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.geirsson#sbt-scalafmt;1.1.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.geirsson:sbt-scalafmt:1.1.0 (scalaVersion=2.10, sbtVersion=0.13)
[warn]
[warn]  Note: Unresolved dependencies path:
[warn]      com.geirsson:sbt-scalafmt:1.1.0 (scalaVersion=2.10, sbtVersion=0.13) (/Users/salonivithalani/Desktop/tw_tmt/csw-prod/project/plugins.sbt#L3-4)
[warn]        +- default:csw-prod-build:0.1-SNAPSHOT (scalaVersion=2.10, sbtVersion=0.13)
sbt.ResolveException: unresolved dependency: com.geirsson#sbt-scalafmt;1.1.0: not found

1 个答案:

答案 0 :(得分:1)

您当前的设置需要sbt版本1.0,因此它不适用于0.13。这里描述了0.13的解决方法http://scalameta.org/scalafmt/#sbt0.13