0

我正在运行 Play 2.4,并尝试将项目导入 Eclipse。

我添加到项目 build.sbt 中:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

当我运行 activator compile 时(如教程所示):

activator compile

我收到以下错误,说sbteclipse找不到插件:

C:\projects\products>activator compile
[info] Loading project definition from C:\projects\products\project
[info] Set current project to products (in build file:/C:/projects/products/)
[info] Updating {file:/C:/projects/products/}root...
[info] Resolving com.fasterxml.jackson.datatype#jackson-datatype-jsr310;2.5.4 ..
[info] Resolving com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0 ...
[warn]  module not found: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0
[warn] ==== local: tried
[warn]   C:\Users\P060467\.ivy2\local\com.typesafe.sbteclipse\sbteclipse-plugin\
4.0.0\ivys\ivy.xml
[warn] ==== activator-launcher-local: tried
[warn]   C:\projects\products\repository\com.typesafe.sbteclipse\sbteclipse-plug
in\4.0.0\ivys\ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse-plugi
n/4.0.0/sbteclipse-plugin-4.0.0.pom
[warn] ==== typesafe-releases: tried
[warn]   https://repo.typesafe.com/typesafe/releases/com/typesafe/sbteclipse/sbt
eclipse-plugin/4.0.0/sbteclipse-plugin-4.0.0.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbteclipse
/sbteclipse-plugin/4.0.0/ivys/ivy.xml
[warn] ==== scalaz-bintray: tried
[warn]   http://dl.bintray.com/scalaz/releases/com/typesafe/sbteclipse/sbteclips
e-plugin/4.0.0/sbteclipse-plugin-4.0.0.pom
[info] Resolving jline#jline;2.12.1 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]  Note: Unresolved dependencies path:
[warn]          com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (C:\projects\pro
ducts\build.sbt#L17-18)
[warn]            +- products:products_2.11:1.0-SNAPSHOT
sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-
plugin;4.0.0: not found
        at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:291)
        at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:188)
        at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:165)
        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:155)
        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:155)
        at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:132)
        at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
        at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
        at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
        at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRet
ries$1(Locks.scala:78)
        at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.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:65)
        at sbt.IvySbt.withIvy(Ivy.scala:127)
        at sbt.IvySbt.withIvy(Ivy.scala:124)
        at sbt.IvySbt$Module.withModule(Ivy.scala:155)
        at sbt.IvyActions$.updateEither(IvyActions.scala:165)
        at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala
:1369)
        at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala
:1365)
        at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$87.apply(Defaults.scala:1
399)
        at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$87.apply(Defaults.scala:1
397)
        at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
        at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1402)
        at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1396)
        at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
        at sbt.Classpaths$.cachedUpdate(Defaults.scala:1419)
        at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1348)
        at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1310)
        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:22
6)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:22
6)
        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(ConcurrentRestric
tions.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:51
1)
        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] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbt
eclipse#sbteclipse-plugin;4.0.0: not found
[error] Total time: 7 s, completed Apr 1, 2016 5:17:23 PM

任何想法如何解决这一问题?我需要手动下载插件吗?

4

1 回答 1

1

添加

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

到 plugins.sbt,而不是 build.sbt

于 2016-04-01T21:32:08.220 回答