Can I install excluded folders for IDEA from SBT?

I have a big SBT project with several modules. One module is the Play2 project. Now, by default, IntelliJ IDEA excludes the entire target folder, and the native IDEA compiler does not start the compile target from sbt, but tries to figure it out on its own. This means that important parts of Play2, such as routes and reverse routers, are not built.

When I run sbt compile from the console, these components are created, but since they are in the target folder, which is excluded by default in IDEA, IDEA ignores everything there.

Each time I switch branches of Git (the Play2 project is in only one branch at the moment), I have to go into the project structure and manually edit the excluded folders.

Is it possible for IDEA to define this on its own and call sbt compile when rebuilding the project?

+5
source share

All Articles