I have created a new play project in Intellij IDEA 2016.2.2 according to the tutorial: https://www.jetbrains.com/help/idea/2016.2/getting-started-with-play-2-x.html (the section "Creating a project"). As a result I have got a project with file Application.scala containing:
package controllers
import play.api._
import play.api.mvc._
class Application extends Controller {
def index = Action {
Ok(views.html.index("Your new application is ready."))
}
}
Then I tried to build it using Build -> Rebuild project command. But I get build error:
Error:(9, 19) object index is not a member of package views.html
Ok(views.html.index("Your new application is ready."))
After starting the app using Run -> Run 'Play2Run' and including the target folder to the build process I managed to build the project via Build -> Rebuild project. But what should I do before building in the case I haven't launched the app via play?
Explanation why my question is not duplicate of another question:
I haven't found clean project opportunity in IntelliJ. Invalidating cache of IntelliJ doesn't help as well. Also the directories target/scala-2.11/src_managed/main and target/scala-2.11/twirl/main are absent in this new project. They emerge after Run 'Play2Run' and after that I can configure this Java Build Path, but I want to avoid using Run 'Play2Run'. How can I create these directories without the Run 'Play2Run'?