将Play与Eclipse集成

时间:2016-08-14 19:13:56

标签: eclipse plugins playframework

我想使用eclipse IDE播放,我在Play网站here上找到了说明。但是,我不知道在哪里添加以下内容,因为这是我第一次以这种方式添加插件!:

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

或者在哪里运行:

// Compile the project before generating Eclipse files, so that generated .scala or .class files for views and routes are present
    EclipseKeys.preTasks := Seq(compile in Compile)

修改 我在项目目录下添加了一个名为“plugins.sbt”的文件,它包含:

libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value

addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.8.5")

addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0")

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

之后我从我的项目目录运行了这个命令,启动了交互模式:

$ sbt

然后我在交互模式下运行compile,但是我收到了以下错误(最后3行),因为我是这样的开发环境中的初学者,所以我真的无法理解!

> compile
[info] Updating {file:/C:/Users/Reem/Music/artest-engine/}artest-engine...
[info] Resolving com.github.gseitz#sbt-release;0.8.5 ...
[warn]  module not found: com.github.gseitz#sbt-release;0.8.5
[warn] ==== local: tried
[warn]   C:\Users\Reem\.ivy2\local\com.github.gseitz\sbt-release\scala_2.10\sbt_0.13\0.8.5\ivys\ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/github/gseitz/sbt-release_2.10_0.13/0.8.5/sbt-release-0.8.5.pom
[warn] ==== activator-local: tried
[warn]   C:\Users\Reem\Music\activator-dist-1.3.10\repository\com.github.gseitz\sbt-release\scala_2.10\sbt_0.13\0.8.5\ivys\ivy.xml
[warn] ==== activator-launcher-local: tried
[warn]   C:\Users\Reem\.activator\repository\com.github.gseitz\sbt-release\scala_2.10\sbt_0.13\0.8.5\ivys\ivy.xml
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/github/gseitz/sbt-release_2.10_0.13/0.8.5/sbt-release-0.8.5.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.github.gseitz/sbt-release/scala_2.10/sbt_0.13/0.8.5/ivys/ivy.xml
[info] Resolving com.typesafe.sbt#sbt-scalariform;1.3.0 ...
[warn]  module not found: com.typesafe.sbt#sbt-scalariform;1.3.0
[warn] ==== local: tried
[warn]   C:\Users\Reem\.ivy2\local\com.typesafe.sbt\sbt-scalariform\scala_2.10\sbt_0.13\1.3.0\ivys\ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-scalariform_2.10_0.13/1.3.0/sbt-scalariform-1.3.0.pom
[warn] ==== activator-local: tried
[warn]   C:\Users\Reem\Music\activator-dist-1.3.10\repository\com.typesafe.sbt\sbt-scalariform\scala_2.10\sbt_0.13\1.3.0\ivys\ivy.xml
[warn] ==== activator-launcher-local: tried
[warn]   C:\Users\Reem\.activator\repository\com.typesafe.sbt\sbt-scalariform\scala_2.10\sbt_0.13\1.3.0\ivys\ivy.xml
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/typesafe/sbt/sbt-scalariform_2.10_0.13/1.3.0/sbt-scalariform-1.3.0.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-scalariform/scala_2.10/sbt_0.13/1.3.0/ivys/ivy.xml
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.github.gseitz#sbt-release;0.8.5: not found
[warn]  :: com.typesafe.sbt#sbt-scalariform;1.3.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]          com.github.gseitz:sbt-release:0.8.5 (scalaVersion=2.10, sbtVersion=0.13)
[warn]          com.typesafe.sbt:sbt-scalariform:1.3.0 (scalaVersion=2.10, sbtVersion=0.13)
[warn]
[warn]  Note: Unresolved dependencies path:
[warn]          com.github.gseitz:sbt-release:0.8.5 (scalaVersion=2.10, sbtVersion=0.13) (C:\Users\Reem\Music\artest-engine\plugins.sbt#L3-4)
[warn]            +- default:artest-engine_2.10:0.1-SNAPSHOT
[warn]          com.typesafe.sbt:sbt-scalariform:1.3.0 (scalaVersion=2.10, sbtVersion=0.13) (C:\Users\Reem\Music\artest-engine\plugins.sbt#L5-6)
[warn]            +- default:artest-engine_2.10:0.1-SNAPSHOT
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.github.gseitz#sbt-release;0.8.5: not found
[error] unresolved dependency: com.typesafe.sbt#sbt-scalariform;1.3.0: not found
[error] Total time: 7 s, completed Aug 14, 2016 10:41:43 PM

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

您可以找到指南here