Scala 带sbt 13.1的Intellij 13无法解析不存在全局插件的全局插件

Scala 带sbt 13.1的Intellij 13无法解析不存在全局插件的全局插件,scala,plugins,intellij-idea,sbt,intellij-13,Scala,Plugins,Intellij Idea,Sbt,Intellij 13,我有一个用sbt构建的scala项目,我正试图将其导入IntelliJ13 Scala 2.10.3和sbt 13.1,Scala插件已安装且最新。使用Oracle JDK7在Fedora20上运行。从命令行生成并运行项目而不发出任何问题。但是,当我尝试将项目导入IntelliJ时,导入失败,因为插件默认为#全局插件;无法解析0.0 我没有在~/.sbt/0.13下安装实际的全局插件 整个项目在配置或其他方面没有对单词global的引用 我对Scala和sbt都是新手,所以如果我遗漏了必要的细节

我有一个用sbt构建的scala项目,我正试图将其导入IntelliJ13

Scala 2.10.3和sbt 13.1,Scala插件已安装且最新。使用Oracle JDK7在Fedora20上运行。从命令行生成并运行项目而不发出任何问题。但是,当我尝试将项目导入IntelliJ时,导入失败,因为插件默认为#全局插件;无法解析0.0

我没有在~/.sbt/0.13下安装实际的全局插件

整个项目在配置或其他方面没有对单词
global
的引用

我对Scala和sbt都是新手,所以如果我遗漏了必要的细节,请原谅。然而,正如我所说的,任何地方都没有提到名为“global”的插件,也没有配置全局插件。日志产生的错误如下所示:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: default#global-plugins;0.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      default:global-plugins:0.0 (sbtVersion=0.13, scalaVersion=2.10)
[warn] 
sbt.ResolveException: unresolved dependency: default#global-plugins;0.0: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:213)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:104)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:51)
    at sbt.IvySbt$$anon$3.call(Ivy.scala:60)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:81)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
    at xsbt.boot.Using$.withResource(Using.scala:11)
    at xsbt.boot.Using$.apply(Using.scala:10)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:60)
    at sbt.IvySbt.withIvy(Ivy.scala:101)
    at sbt.IvySbt.withIvy(Ivy.scala:97)
    at sbt.IvySbt$Module.withModule(Ivy.scala:116)
    at sbt.IvyActions$.update(IvyActions.scala:121)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1144)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1142)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1165)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1163)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1167)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1162)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1170)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1135)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1113)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
    at sbt.std.Transform$$anon$4.work(System.scala:64)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:244)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    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.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: default#global-plugins;0.0: not found

    at org.jetbrains.sbt.project.SbtProjectResolver.resolveProjectInfo(SbtProjectResolver.scala:31)
    at org.jetbrains.sbt.project.SbtProjectResolver.resolveProjectInfo(SbtProjectResolver.scala:19)
    at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:41)
    at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:37)
    at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59)
    at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
    ... 21 more

我已经搜索过了,没有发现任何人遇到这个无法解决的错误——有没有其他人遇到过这个问题,或者知道为什么会发生这种情况?谢谢。

我刚刚在命令行而不是IntelliJ中遇到了这个错误。我最终能够通过在以下目录上执行rm-rf来解决它

target
project/target
project/project/target
~/.sbt/
~/.ivy2/
我还有其他复杂的因素

  • 我刚升级到最新版本
  • 我还尝试在project/build.properties中升级到0.13.1到0.13.2
  • 我们阻止所有对外部回购的访问,并通过我们的内部工件推动一切(我还能够通过关闭此功能来消除问题-因此您的问题也可能与网络有关。)

我发现在
~/.sbt/0.13/plugins
添加一个空文件夹有效

编辑:当我再次遇到问题时,这对我不起作用。这次我的方法是下载zip和别名
sbt
,以指向可执行文件(将其放在我的路径上会导致相同的错误!!)

这表明
sbt
对其他配置不满意,但我决定不去寻找它的位置:)