Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiproject builds fine in terminal, but not in IntelliJ #95

Open
DCKcode opened this issue Jul 14, 2014 · 3 comments
Open

Multiproject builds fine in terminal, but not in IntelliJ #95

DCKcode opened this issue Jul 14, 2014 · 3 comments

Comments

@DCKcode
Copy link

DCKcode commented Jul 14, 2014

I have multiple SBT subprojects depending on a base project. They all need to have enabled the Play plugin for them to compile.

// base/build.sbt
lazy val base = (project in file(".")).enablePlugins(PlayScala)

// sub1/build.sbt
lazy val base = ProjectRef(file("../base"), "base")

lazy val sub1 = (project in file(".")).enablePlugins(PlayScala).dependsOn(base % "test->test;compile->compile").aggregate(base)

// sub2/build.sbt
lazy val base = ProjectRef(file("../base"), "base")

lazy val sub2 = (project in file(".")).enablePlugins(PlayScala).dependsOn(base % "test->test;compile->compile").aggregate(base)

If I do an sbt run or sbt compile in the respective directories these projects build and run just fine. However, when I try to import these projects into IntelliJ by using the native SBT project support, an error is thrown. IntelliJ's SBT plugin fails with the following error:

value enablePlugins is not a member of sbt.Project

After which the import fails. It seems I encountered a bug?

@DCKcode
Copy link
Author

DCKcode commented Jul 14, 2014

Looking around the source code - might this have something to do with my project layout?

 projectdir
 +---base/
 +-------project/
 +------------build.properties <-- contains sbt=0.13.5
 +-------build.sbt
 +---sub1/
 +-------build.sbt
 +-------project/
 +------------build.properties <-- contains sbt=0.13.5
 +---sub2/
 +-------project/
 +------------build.properties <-- contains sbt=0.13.5
 +-------build.sbt

My project directory is not an sbt project, but its subfolders are. Is that something that can confuse this plugin?

@DCKcode
Copy link
Author

DCKcode commented Jul 18, 2014

I've moved everything to a single build.sbt in the project root, and IntelliJ still cannot find enablePlugins. Maybe this problem is more general?

@farley13
Copy link

@DCKcode - I suspect this is happening in the core intellij sbt support, not this plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants