Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does subproject not compile after migrating from 2.2 to 2.3?

I switched to Play Framework 2.3 and now having an error, that my sub projects, on which my project is depending on, are not compiled anymore.

This is my Build.scala file:

val main = Project(appName, file(".")).enablePlugins(play.PlayScala).settings(
    version := appVersion,
    scalaVersion := "2.10.4",
    libraryDependencies += jdbc,
    libraryDependencies += cache,
    slickCodeGen <<= slickCodeGenTask,
    sourceGenerators in Compile <+= slickCodeGenTask 
).dependsOn(dbGen)

When I run or compile my project, the target/scala-2.10 remains empty. Even if I try compiling the sub project explicitly via command line (project dbGen and then compile), same result. When compiling my main project, I get a java.lang.ClassNotFoundException, since my sub project wasn't compiled.

It worked all fine with Play 2.2. Any idea what I might be doing wrong?

like image 292
pichsenmeister Avatar asked Jun 18 '14 12:06

pichsenmeister


1 Answers

Change

val main = ...

to

lazy val main = ...

http://www.scala-sbt.org/0.13.5/docs/Getting-Started/Multi-Project.html

Play 2.3 subproject dependsOn

like image 149
Peter Kolloch Avatar answered Oct 02 '22 00:10

Peter Kolloch