Update play 2.2 to 2.3 // build.scala to build.sbt [play-java]

3,032 views
Skip to first unread message

flp

unread,
Jul 23, 2014, 8:40:05 AM7/23/14
to play-fr...@googlegroups.com
I tried to update my play 2.2 app and therefore my build.scale to a build.sbt.

That's my try to convert it to a build.sbt:

name := "betting_game"

version
:= "1.0-SNAPSHOT"

libraryDependencies
++= Seq(
  javaCore
, javaJdbc, javaEbean, javaJpa, cache,
 
"com.typesafe" %% "play-plugins-mailer" % "2.1-RC2",
 
"postgresql" % "postgresql" % "9.1-901-1.jdbc4",
  jacoco
.settings:_*
)

parallelExecution
in jacoco.Config := false      

lazy val root
= (project in file(".")).enablePlugins(PlayJava)

Unfortunately, I always get this error:

build.sbt:14: error: not found: value PlayJava
lazy val root = (project in file(".")).enablePlugins(PlayJava)
                                                     ^

I tried to google, but I didn't find anything helpful.


William Billingsley

unread,
Jul 25, 2014, 1:35:51 AM7/25/14
to play-fr...@googlegroups.com
.enablePlugins(play.PlayJava)

And in project/plugins.sbt:

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

Megazord

unread,
Jul 26, 2014, 2:44:27 PM7/26/14
to play-fr...@googlegroups.com
Also, update the sbt version to 0.13.5 in your project/build.properties.

HTH

flp

unread,
Jul 28, 2014, 12:29:45 PM7/28/14
to play-fr...@googlegroups.com
I followed the update instructions of play, therefore I needn't to change the sbt version.

But also if I change it to play.PlayJava, I will get the following error:

build.sbt:14: error: not found: value play
lazy val root = (project in file(".")).enablePlugins(play.PlayJava)

Megazord

unread,
Jul 28, 2014, 2:51:51 PM7/28/14
to play-fr...@googlegroups.com
Could you please post your project/plugins.sbt?

Best,

flp

unread,
Jul 30, 2014, 1:11:40 PM7/30/14
to play-fr...@googlegroups.com
// Comment to get more information during initialization
logLevel
:= Level.Warn

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


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


addSbtPlugin
("com.typesafe.sbt" % "sbt-less" % "1.0.0")

addSbtPlugin
("de.johoop" % "jacoco4sbt" % "2.1.1")

flp

unread,
Aug 5, 2014, 8:06:13 PM8/5/14
to play-fr...@googlegroups.com
Found the problem. I needed to move the file to the head folder of the project :/
Message has been deleted

Parag Lohiya

unread,
Apr 15, 2015, 12:45:57 AM4/15/15
to play-fr...@googlegroups.com
The folder structure should be 

<primaryfolder>/project/build.properties
<primaryfolder>/project/projects.sbt
<primaryfolder>/build.sbt

Guilherme Scofano

unread,
Aug 7, 2015, 3:26:53 AM8/7/15
to play-framework
Hi flp!

I'm having the same problem you did. What do you mean by moving the file to the head folder? Do I put plugins.sbt inside the root directory of the project instead of /projects ? It goes against the tutorials I followed. Did it work for you?

Regards,
Reply all
Reply to author
Forward
0 new messages