Alex Rivera | Logout

scala 2.10Mx with playframework 2

Asked 2012-05-24T17:24:12.050
11

How to use scala 2.10Mx with play 2.x.x?

I tried adding scalaVersion := "2.10.0-M3" to project/Build.scala but had no effect.

Here's my project/Build.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

    )

}

I'm using sbt 0.11.3

Edit
Report

1 Answer

0

Well, actually you can do it. I described details in my answer here.

But in few words you need to specify few things in Build.scala.

Switching version by setting scalaVersion to 2.10.1 didn't help me because SBT still goes to repository and gets pieces of 2.10.0. So I told SBT to use local copy of Scala by setting following variables

scalaVersion := "2.10.1-local",
autoScalaLibrary := false,
scalaHome := Some(file("/Program Files (x86)/scala/"))
answered 2013-03-28T07:15:43.203

Your Answer