m1416
m1416

Reputation: 1087

Play multidomain intellij not runnable

I have cloned the template from here

https://github.com/adrianhurt/play-multidomain-auth#master

and I do the following

Steps:

  1. Import into intellij with auto-import enabled
  2. Run admin module -> it works
  3. Close Intellij
  4. Ropen Intellij
  5. Run admin module -> it does not work.

I think it is a bug from Intellij or the scala plugin as the project does run with activator. The error I get is:

/Users/git/sample/modules/admin/build.sbt:1: error: not found: value Common

Common.moduleSettings("admin") ^ [error] Type error in expression

And it is because Intellij is auto-generating a project folder inside the admin module, thus the parent project folder is not visible. From the sbt reference http://www.scala-sbt.org/1.0/docs/Multi-Project.html:

You cannot have a project subdirectory or project/*.scala files in the sub-projects. foo/project/Build.scala would be ignored.

I have spent hours on this and cant seem to find the magic config that makes intellij not auto generate modules/admin/project directory

If I do

activator ";project admin;~run"

the project runs perfectly

Upvotes: 1

Views: 90

Answers (1)

Justin Kaeser
Justin Kaeser

Reputation: 5948

Fixed in IntelliJ-Scala 2017.1: https://youtrack.jetbrains.com/issue/SCL-11291

Upvotes: 0

Related Questions