English 中文(简体)
2.10Mx 带游戏框架 2的 calaa 2.10Mx
原标题:scala 2.10Mx with playframework 2

如何使用 scala 2. 10Mx 和 play 2. x. x 如何使用?

我尝试在工程/建筑.scala中添加 scalaVersion : = "2.10.0- M3", 但是没有效果 。

以下是我的项目/建筑. scala:

import sbt._
import Keys._
import PlayProject._

object ApplicationBuild extends Build {

    val appName         = "dashboard-server"
    val appVersion      = "1.0-SNAPSHOT"

    resolvers += "Local Ivy Repository" at "file://"+Path.userHome.absolutePath+"/.ivy2/cache"

    scalaVersion := "2.10.0-M3"

    val appDependencies = Seq(
      "mysql" % "mysql-connector-java" % "5.1.10"
    )

    val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
      // Add your own project settings here

    )

}

我用的是0.1.1.3桶

问题回答

游戏追踪器有一张罚单:https://play.lighthousepp.com/projects/82401/tickets/650-scala-scala-210-m6

答案是您目前因 akka 无法使用 2 和 scala 2. 10 玩 。

play 2.0.x doesn t work with Scala 2.10. the Play 2.1 branch does, but as of the time i write this (25 Oct 2012), you need to build the development branch from source, and the development branches are still under active development. TLDR: not yet suitable for production apps, give it a couple months

事实上,你可以做到这一点。我在我的回答中描述了细节。<%a href=><这里。>

但用几句话来说,您需要在 Build.scala 中指定几件事情。

scalaVersion 设置为 2.10.1 以切换版本至 2.10.1 对我没有帮助,因为 SBT 仍然去仓库并获得2.10.0的片段。 所以我告诉 SBT 使用本地的 Scala 副本, 设定变量

scalaVersion := "2.10.1-local",
autoScalaLibrary := false,
scalaHome := Some(file("/Program Files (x86)/scala/"))




相关问题
How to flatten a List of different types in Scala?

I have 4 elements:List[List[Object]] (Objects are different in each element) that I want to zip so that I can have a List[List[obj1],List[obj2],List[obj3],List[obj4]] I tried to zip them and I ...

To use or not to use Scala for new Java projects? [closed]

I m impressed with Twitter and investigating to use Scala for a new large scale web project with Hibernate and Wicket. What do you think about Scala, and should I use it instead of Java? EDIT: And, ...

Why does Scala create a ~/tmp directory when I run a script?

When I execute a Scala script from the command line, a directory named "tmp" is created in my home directory. It is always empty, so I simply deleted it without any apparent problem. Of course, when I ...

Include jar file in Scala interpreter

Is it possible to include a jar file run running the Scala interpreter? My code is working when I compile from scalac: scalac script.scala -classpath *.jar But I would like to be able to include a ...

Scala and tail recursion

There are various answers on Stack Overflow which explain the conditions under which tail recursion is possible in Scala. I understand the limitations and how and where I can take advantage of tail ...