tuplejump / play-yeoman

Play + Yeoman integration sbt and play plugins
Apache License 2.0
237 stars 58 forks source link

Build.scala not available in play 2.2 #37

Closed pulse00 closed 10 years ago

pulse00 commented 10 years ago

I'm new to the play framework and stumbled upon your yeoman integration, which looks great. However, play 2.2. seems to have ditched the project/Build.scala configuration file and replaced it with a build.sbt in the root of the project.

Does anyone have a hint how to put the configuration mentioned in the readme into the build.sbt file?

This part here:

  val main = play.Project(appName, appVersion, appDependencies).settings(
    // Add your own project settings here
    Yeoman.yeomanSettings : _*
  )

which i assume should be integrated somehow into the build.sbt file:


name := "play-jbook"

version := "1.0-SNAPSHOT"

libraryDependencies ++= Seq(
  javaJdbc,
  javaEbean,
  cache
)

play.Project.playJavaSettings
JoshRosen commented 10 years ago

Try changing the last line to read

play.Project.playJavaSettings ++ Yeoman.yeomanSettings
pulse00 commented 10 years ago

@JoshRosen worked fine, thanks!

ferranjr commented 10 years ago

@pulse00

You could also create a Build.scala file and remove part of the code within the sbt file... at the end, the sbt "will create Build.scala from the build.sbt".

Normally the build.sbt should be enough for what you want, but some times, when you are adding plugins that needs more set up, like sbt-release ... you will probably feel better editing the Build.scala.