我正在尝试安装sbt-eclipse,但在运行sbt
或sbt update
时,我不断收到以下错误。
错误
[info]从/home/atbyrd/.sbt/0.13/plugins加载全局插件 [info]更新 {file:/home/atbyrd/.sbt/0.13/plugins/} global-plugins ... [info] 解析org.scala-sbt#compiler-interface; 0.13.1 ... [warn] :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::警告: :
无人解决的依赖:: [警告] :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::警告: : org.scala-lang #scala-library; 2.10.3:找不到配置 org.scala-lang #scala-library; 2.10.3:'compile'。它是必需的 默认#global-plugins; 0.0提供[warn] :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: sbt.ResolveException: 未解决的依赖:org.scala-lang #scala-library; 2.10.3: 在org.scala-lang#scala-library中找不到配置; 2.10.3: “汇编”。它是默认#global-plugins; 0.0提供的 在sbt.IvyActions $ .sbt $ IvyActions $$ resolve(IvyActions.scala:213)at at sbt.IvyActions $$ anonfun $ update $ 1.apply(IvyActions.scala:122)at at sbt.IvyActions $$ anonfun $ update $ 1.apply(IvyActions.scala:121)at at sbt.IvySbt $ Module $$ anonfun $ withModule $ 1.apply(Ivy.scala:116)at at sbt.IvySbt $ Module $$ anonfun $ withModule $ 1.apply(Ivy.scala:116)at at sbt.IvySbt $$ anonfun $ withIvy $ 1.apply(Ivy.scala:104)at at sbt.IvySbt.sbt $ IvySbt $ action $ 1(Ivy.scala:51)at at sbt.IvySbt $$ anon $ 3.call(Ivy.scala:60)at xsbt.boot.Locks $ GlobalLock.withChannel $ 1(Locks.scala:98)at at xsbt.boot.Locks $ GlobalLock.xsbt $启动$ $锁$$ GlobalLock $ withChannelRetries 1(Locks.scala:81) 在 xsbt.boot.Locks $ $$ GlobalLock $ anonfun $ withFileLock 1.适用(Locks.scala:102) 在 xsbt.boot.Locks $ $$ GlobalLock $ anonfun $ withFileLock 1.适用(Locks.scala:102) 在xsbt.boot.Using $ .withResource(Using.scala:11)at xsbt.boot.Using $ .apply(Using.scala:10)at xsbt.boot.Locks $ GlobalLock.withFileLock(Locks.scala:102)at xsbt.boot.Locks $ GlobalLock.ignoringDeadlockAvoided(Locks.scala:62)at at xsbt.boot.Locks $ GlobalLock.withLock(Locks.scala:52)at xsbt.boot.Locks $ .apply0(Locks.scala:38)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) 在sbt.IvySbt $ Module.withModule(Ivy.scala:116)at sbt.IvyActions $ .update(IvyActions.scala:121)at sbt.Classpaths $$ anonfun $ SBT $类路径$$工作$ 1 $ 1.适用(Defaults.scala:1161) 在 sbt.Classpaths $$ anonfun $ SBT $类路径$$工作$ 1 $ 1.适用(Defaults.scala:1159) 在 sbt.Classpaths $$ anonfun $的doWork $ 1 $ 1 $$ anonfun $ 73.apply(Defaults.scala:1182) 在 sbt.Classpaths $$ anonfun $的doWork $ 1 $ 1 $$ anonfun $ 73.apply(Defaults.scala:1180) 在sbt.Tracked $$ anonfun $ lastOutput $ 1.apply(Tracked.scala:35)at at sbt.Classpaths $$ anonfun $ doWork $ 1 $ 1.apply(Defaults.scala:1184)at at sbt.Classpaths $$ anonfun $ doWork $ 1 $ 1.apply(Defaults.scala:1179)at at sbt.Tracked $$ anonfun $ inputChanged $ 1.apply(Tracked.scala:45)at at sbt.Classpaths $ .cachedUpdate(Defaults.scala:1187)at sbt.Classpaths $$ anonfun $ updateTask $ 1.apply(Defaults.scala:1152)at at sbt.Classpaths $$ anonfun $ updateTask $ 1.apply(Defaults.scala:1130)at at scala.Function1 $$ anonfun $ compose $ 1.apply(Function1.scala:47)at sbt。$ tilde $ greater $$ anonfun $$ u2219 $ 1.apply(TypeFunctions.scala:42)at at sbt.std.Transform $$ anon $ 4.work(System.scala:64)at sbt.Execute $$ anonfun $提交$ 1 $$ anonfun $ $适用1.适用(Execute.scala:237) 在 sbt.Execute $$ anonfun $提交$ 1 $$ anonfun $ $适用1.适用(Execute.scala:237) 在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 $$匿名$ $$ 4 $ anonfun 1.适用(ConcurrentRestrictions.scala:160) 在sbt.CompletionService $$ anon $ 2.call(CompletionService.scala:30)at java.util.concurrent.FutureTask.run(FutureTask.java:266)at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511) 在java.util.concurrent.FutureTask.run(FutureTask.java:266)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在 java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:617) 在java.lang.Thread.run(Thread.java:745)[错误](*:更新) sbt.ResolveException:未解析的依赖项: org.scala-lang #scala-library; 2.10.3:找不到配置 org.scala-lang #scala-library; 2.10.3:'compile'。它是必需的 默认#global-plugins; 0.0提供
〜/名.bst / 0.13 /插件/ build.sbt
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
resolvers += "mvnrepository" at "http://mvnrepository.com/artifact/"
resolvers += Resolver.typesafeRepo("releases")
resolvers += Resolver.sonatypeRepo("releases")
resolvers += Resolver.sbtPluginRepo("releases")
cat~ / .sbt / 0.13 / plugins / plugins.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")
答案 0 :(得分:3)
问题与兼容性问题有关。 SBT不能直接与JDK 8兼容。我可以通过添加以下依赖项来解决这个问题。
libraryDependencies += "org.scala-lang.modules" %% "scala-java8-compat" % "0.2.0"
答案 1 :(得分:0)
我尝试了最好的答案"它并没有解决我的问题。我了解到我只是使用了错误的sbt
版本。当我安装sbt 0.13.11
时,插件错误就解决了。