Playframework 2.0 with maven and sub-project

485 Views Asked by At

I have a project "core" that is mavenized. I have also a play project that uses "core". The play project is also mavenized. So there is a maven parent project that manage both sub-modules. It works fine with maven (mvn install, mvn compile...) But when I launch play and reload the browser page, the compiler fails because it doesn't find the "core" project. It's normal because I must add something to indicate to play where to find the "core" project. I have tried to add a project dependency but "core" must be in modules folder of play project and I don't want that.

How can I indicate to play to compile also the sources of "core" project or at least indicate play where to find "core" project classes ?

Thanks


Thank you for the response. But I have already tried many things I found on the net about configuring sbt (redefine unmanagedClasses for example) but I didn't succeed to make it work...

Have you a full example how to configure sbt to compile also external source ?

(I don't know how sbt works and the syntax of neither sbt or scala so a comlete sample that works will be very helpful)

1

There are 1 best solutions below

1
On

With play 2.0, using sbt, you can configure how things are compiled and where they are located.

With play 1.X, if you don't want your core sources as a dependency lib, you have to move them in /app. You can also use symbolic links to have your core sources under /app