Reputation: 3081
I have initiated a play-framework application, using the activator. Then I've set the scala's version in the build.sbt to scalaVersion := "2.11.7"
.
Now I'm having three different target folder in my application, two of which have a scala-{version} sub-folder as demonstrated bellow.
/root
├──project
│ ├──project
│ │ └──target
│ └──target
│ └──scala-2.10
└──target
└──scala-2.11
Is it the correct folder structure?
If not, is there any automated tool/command to reorganise the project directory structure?
Any advise on best practice to constructing a play-framework directory tree, avoiding unnecessary files and folders will be appreciated :)
Upvotes: 4
Views: 1605
Reputation: 674
The short answer ... you need all of these directories.
There are actually multiple builds defined. Play uses SBT to build your project, and SBT generates a build project, which is stored below the project directory. It's an SBT project in its' own right, which you can optionally customize (e.g., adding your own build tasks, referencing sbt plugins, etc.).
Your play application compiles your sources using scala 2.11. The SBT build itself is clearly a separate build process, based on a different version of scala (2.10).
See this answer to a similar question, which provides a somewhat more detailed explanation:
Multiple target directories in sbt project build
Here's the official SBT page that discusses the issue:
http://www.scala-sbt.org/1.0/docs/Organizing-Build.html
Upvotes: 2