luontola / idea-sbt-plugin

IntelliJ IDEA plugin for integration with SBT (Simple Build Tool) in order to compile Scala projects easily and quickly [UNMAINTAINED]
http://plugins.intellij.net/plugin/?idea&id=5007
Apache License 2.0
178 stars 28 forks source link

IDEA project file name is forced to be root.iml and root-build.iml #94

Open slorion opened 10 years ago

slorion commented 10 years ago

I have a Play 2.2.3 project which I upgraded to 2.3.0. After refreshing the SBT project, new IDEA project files have been created, named root.iml and root-build.iml. Old ones were still there and still referenced in modules.xml, so I had to manually remove them. I also had to manually rename/move those files in my VCS to keep their history.

Why are project files forced to be named root/root-build.iml and be located under .idea/modules (mine were at the root, which is the default behavior for Intellij) ? If it is really necessary, then please make sure the procedure move files instead of creating new ones and update modules.xml correctly.

FoxxMD commented 10 years ago

+1 . It's causing a huge headache for me

tms commented 9 years ago

Note that this plugin is not responsible for generating project files, so this issue is likely in the wrong place, but…

The *.iml files are generated based on the project ID, which is defined implicitly by the variable name for the project in the build.sbt file.

For Play this is automatically generated as lazy val root = (project in file("."), which is why you end up with root.iml and root-build.iml. Changing the variable name to something else will result in a different name for those files.

I'm unsure as to why the module files are placed as they are, because that didn't bother me enough to look into it.