Question

On Macos Maverics, I have following issue:

I cloned Playframework repository and wanted to build the samples. Unfortunately it doesn't work. I have playframework on my path, play-2.2.3.

I tried to import it from Intellij IDEA but the same error.

localhost:helloworld radimpavlicek$ play 
[info] Loading project definition from /Users/radimpavlicek/Documents/playframework/samples/scala/helloworld/project
/Users/radimpavlicek/Documents/playframework/samples/scala/helloworld/build.sbt:5: error: not found: value PlayScala
lazy val root = (project in file(".")).enablePlugins(PlayScala)
                               ``                      ^
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 
Was it helpful?

Solution

I just had the same problem in Ubuntu 14.04 trying to build the zentask sample app. I eliminated the offending line in the build.sbt and added play.Project.playScalaSettings to the end and was able to compile and run from the Play console. This is my current zentask build.sbt (empty lines are needed):

name := "zentask"

version := "1.0"

libraryDependencies ++= Seq(jdbc, anorm)

scalaVersion := Option(System.getProperty("scala.version")).getOrElse("2.10.4")

play.Project.playScalaSettings

OTHER TIPS

The application build has changed from Play 2.2.x to 2.3.x, and your build.sbt appears to be in 2.3 format. If you've checked out the helloworld project from Github, make sure you're on the 2.2.x branch or otherwise upgrade Play to 2.3.0-RC1 (the latest as of this writing.) In 2.2, the build.sbt for the helloworld sample consists of this in its entirety:

import play.Project._

name := "helloworld"

version := "1.0"

playScalaSettings

enablePlugins isn't available in sbt.Project until sbt 0.13.5.

You can update your sbt version following this link http://www.scala-sbt.org/download.html and instead of using install, use update/upgrade(depends on you package manager)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top