玩:错误:未找到:值playScalaSettings

时间:2013-09-17 05:59:09

标签: scala build playframework sbt ivy

我正在尝试使用sbt 0.12在Scala中创建一个新的播放应用程序myFirstApp。我在myFirstApp /文件夹中有build.sbt。我还将plugins.sbt添加到myFirstApp / project /文件夹。

Build.sbt

import play.Project._

name := "My first application"

version := "1.0"

playScalaSettings

plugins.sbt

// Typesafe snapshots
resolvers += "Typesafe Snapshots" at "http://repo.typesafe.com/typesafe/snapshots/"

resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0-M1")

build.properties

sbt.version=0.12.3

从myFirstApp文件夹执行sbt时,我收到错误

error: not found: value playScalaSettings

如何摆脱它?

1 个答案:

答案 0 :(得分:7)

只需更改

<强> build.properties

sbt.version=0.13.0

<强> plugins.sbt

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.3")

截至2014年5月9日,该插件的最后稳定版本为2.2.3。您可以查看Typesafe repo获取最新版本。

Play 2.2目前没有SBT 0.12.x插件:http://repo.typesafe.com/typesafe/releases/com.typesafe.play/sbt-plugin/scala_2.10/ 我的M1也不在回购http://repo.typesafe.com/typesafe/releases/com.typesafe.play/sbt-plugin/scala_2.10/sbt_0.13/