sbt.ResolveException:未解决的依赖关系:com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT:未找到
sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT: not found
这是我在 /sbt/0.13/plugins
下的 build.sbt
文件
scalaVersion := "2.11.5"
sbtVersion := "0.13.7"
libraryDependencies += "org.apache.spark" %% "spark-core" % "1.2.1"
libraryDependencies += "org.apache.spark" %% "spark-streaming" % "1.2.1"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "1.2.1"
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.7.0-SNAPSHOT")
我明白了
[info] Resolving com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT ...
[warn] module not found: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT
[warn] ==== local: tried
[warn] /home/cloudera/.ivy2/local/com.github.mpeltonen/sbt-idea/scala_2.11/sbt_0.13/1.7.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/github/mpeltonen/sbt-idea_2.11_0.13/1.7.0-SNAPSHOT/sbt-idea-1.7.0-SNAPSHOT.pom
[warn] ==== Sonatype snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/com/github/mpeltonen/sbt-idea_2.11_0.13/1.7.0-SNAPSHOT/sbt-idea-1.7.0-SNAPSHOT.pom
[info] Resolving jline#jline;2.12 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.github.mpeltonen:sbt-idea:1.7.0-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.11)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.github.mpeltonen:sbt-idea:1.7.0-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.11) (/home/cloudera/.sbt/0.13/plugins/build.sbt#L13-14)
[warn] +- default:plugins_2.11:0.1-SNAPSHOT
sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:278)
at sbt.IvyActions$$anonfun$updateEither.apply(IvyActions.scala:175)
at sbt.IvyActions$$anonfun$updateEither.apply(IvyActions.scala:157)
at sbt.IvySbt$Module$$anonfun$withModule.apply(Ivy.scala:151)
at sbt.IvySbt$Module$$anonfun$withModule.apply(Ivy.scala:151)
at sbt.IvySbt$$anonfun$withIvy.apply(Ivy.scala:128)
at sbt.IvySbt.sbt$IvySbt$$action(Ivy.scala:56)
at sbt.IvySbt$$anon.call(Ivy.scala:64)
at xsbt.boot.Locks$GlobalLock.withChannel(Locks.scala:93)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries(Locks.scala:78)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock.apply(Locks.scala:97)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:64)
at sbt.IvySbt.withIvy(Ivy.scala:123)
at sbt.IvySbt.withIvy(Ivy.scala:120)
at sbt.IvySbt$Module.withModule(Ivy.scala:151)
at sbt.IvyActions$.updateEither(IvyActions.scala:157)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work.apply(Defaults.scala:1318)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work.apply(Defaults.scala:1315)
at sbt.Classpaths$$anonfun$doWork$$anonfun.apply(Defaults.scala:1345)
at sbt.Classpaths$$anonfun$doWork$$anonfun.apply(Defaults.scala:1343)
at sbt.Tracked$$anonfun$lastOutput.apply(Tracked.scala:35)
at sbt.Classpaths$$anonfun$doWork.apply(Defaults.scala:1348)
at sbt.Classpaths$$anonfun$doWork.apply(Defaults.scala:1342)
at sbt.Tracked$$anonfun$inputChanged.apply(Tracked.scala:45)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1360)
at sbt.Classpaths$$anonfun$updateTask.apply(Defaults.scala:1300)
at sbt.Classpaths$$anonfun$updateTask.apply(Defaults.scala:1275)
at scala.Function1$$anonfun$compose.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon.work(System.scala:63)
at sbt.Execute$$anonfun$submit$$anonfun$apply.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$$anonfun$apply.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$$anonfun.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon.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] (*:update) sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT: not found
稳定的 sbt-idea 1.6 和 1.7 的快照都会出现这种情况。
不知道为什么,这直到昨天才有效
您应该将此配置分成两部分。
在你的 .sbt/0.13/plugins/plugins.sbt
中输入行
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.7.0-SNAPSHOT")
对于想法插件。
将其他行放在项目的 build.sbt 中。
你混合它的方式是告诉 sbt 下载插件的 Scala 2.11 版本,它不存在,你也不需要,因为 sbt 本身是用 2.10 编译的。
这是我在 /sbt/0.13/plugins
build.sbt
文件
scalaVersion := "2.11.5"
sbtVersion := "0.13.7"
libraryDependencies += "org.apache.spark" %% "spark-core" % "1.2.1"
libraryDependencies += "org.apache.spark" %% "spark-streaming" % "1.2.1"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "1.2.1"
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.7.0-SNAPSHOT")
我明白了
[info] Resolving com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT ...
[warn] module not found: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT
[warn] ==== local: tried
[warn] /home/cloudera/.ivy2/local/com.github.mpeltonen/sbt-idea/scala_2.11/sbt_0.13/1.7.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/github/mpeltonen/sbt-idea_2.11_0.13/1.7.0-SNAPSHOT/sbt-idea-1.7.0-SNAPSHOT.pom
[warn] ==== Sonatype snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/com/github/mpeltonen/sbt-idea_2.11_0.13/1.7.0-SNAPSHOT/sbt-idea-1.7.0-SNAPSHOT.pom
[info] Resolving jline#jline;2.12 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.github.mpeltonen:sbt-idea:1.7.0-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.11)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.github.mpeltonen:sbt-idea:1.7.0-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.11) (/home/cloudera/.sbt/0.13/plugins/build.sbt#L13-14)
[warn] +- default:plugins_2.11:0.1-SNAPSHOT
sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:278)
at sbt.IvyActions$$anonfun$updateEither.apply(IvyActions.scala:175)
at sbt.IvyActions$$anonfun$updateEither.apply(IvyActions.scala:157)
at sbt.IvySbt$Module$$anonfun$withModule.apply(Ivy.scala:151)
at sbt.IvySbt$Module$$anonfun$withModule.apply(Ivy.scala:151)
at sbt.IvySbt$$anonfun$withIvy.apply(Ivy.scala:128)
at sbt.IvySbt.sbt$IvySbt$$action(Ivy.scala:56)
at sbt.IvySbt$$anon.call(Ivy.scala:64)
at xsbt.boot.Locks$GlobalLock.withChannel(Locks.scala:93)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries(Locks.scala:78)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock.apply(Locks.scala:97)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:64)
at sbt.IvySbt.withIvy(Ivy.scala:123)
at sbt.IvySbt.withIvy(Ivy.scala:120)
at sbt.IvySbt$Module.withModule(Ivy.scala:151)
at sbt.IvyActions$.updateEither(IvyActions.scala:157)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work.apply(Defaults.scala:1318)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work.apply(Defaults.scala:1315)
at sbt.Classpaths$$anonfun$doWork$$anonfun.apply(Defaults.scala:1345)
at sbt.Classpaths$$anonfun$doWork$$anonfun.apply(Defaults.scala:1343)
at sbt.Tracked$$anonfun$lastOutput.apply(Tracked.scala:35)
at sbt.Classpaths$$anonfun$doWork.apply(Defaults.scala:1348)
at sbt.Classpaths$$anonfun$doWork.apply(Defaults.scala:1342)
at sbt.Tracked$$anonfun$inputChanged.apply(Tracked.scala:45)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1360)
at sbt.Classpaths$$anonfun$updateTask.apply(Defaults.scala:1300)
at sbt.Classpaths$$anonfun$updateTask.apply(Defaults.scala:1275)
at scala.Function1$$anonfun$compose.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon.work(System.scala:63)
at sbt.Execute$$anonfun$submit$$anonfun$apply.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$$anonfun$apply.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$$anonfun.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon.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] (*:update) sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea;1.7.0-SNAPSHOT: not found
稳定的 sbt-idea 1.6 和 1.7 的快照都会出现这种情况。 不知道为什么,这直到昨天才有效
您应该将此配置分成两部分。
在你的 .sbt/0.13/plugins/plugins.sbt
中输入行
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.7.0-SNAPSHOT")
对于想法插件。
将其他行放在项目的 build.sbt 中。
你混合它的方式是告诉 sbt 下载插件的 Scala 2.11 版本,它不存在,你也不需要,因为 sbt 本身是用 2.10 编译的。