5

I have the following problem on IntelliJ IDEA 14:

I created a Play (Scala) project using the Activator (v1.2.10). Then, I converted it to an IDEA project using activator idea command. When, I opened the project with IDEA 14 (Community Edition) the SBT module is not enabled. Therefore, a new dependency in build.sbt file is not included in the classpath. Moreover, the project is not listed in IDEA's SBT view.

The following warning is shown by IDEA:

"This IDEA project is converted from an SBT project by gen-idea tool, which currently relies on a legacy Scala project model. Please consider using built-in SBT support via the Import project action."

Note that, the Scala and SBT plugins are already installed on IDEA.

I don't encounter with the same issue in IDEA 13.

ovunccetin
  • 8,443
  • 5
  • 42
  • 53

3 Answers3

1

Have you tried File | Import Project and select build.sbt file?

IDEA imports it as an SBT project, with all the dependencies properly resolved. It works fine for me on IDEA 14 and on 13.

Anton Dozortsev
  • 4,782
  • 5
  • 34
  • 69
bravo2
  • 693
  • 5
  • 13
  • Unfortunately not working. Might it be about the community edition of IDEA? – ovunccetin Nov 18 '14 at 07:35
  • If you're having trouble with the SBT support in IntelliJ, a work-around for now is, when you've added a new dependency, to use `reload` and then `idea` in the activator console. IntelliJ will then detect the changes to the project files and request a refresh. – Steve Chaloner Nov 18 '14 at 08:05
  • @ovunccetin Scala and SBT support [should be available](https://www.jetbrains.com/idea/features/editions_comparison_matrix.html) in the Community version. But Play support is only in Ultimate. – bravo2 Nov 19 '14 at 19:08
  • Play support has been moved into the Scala plugin. Shouldn't that make it available in the Community version? – Splaktar Dec 18 '14 at 15:09
  • @Splaktar According to the [Intellij IDEA Editions Comparison Matrix](https://www.jetbrains.com/idea/features/editions_comparison_matrix.html) I linked above, play support is not available on Community Edition. – bravo2 Apr 10 '15 at 17:50
  • I see a down-vote on my answer, can you please add a comment to explain why you down-voted? – bravo2 Apr 10 '15 at 17:53
  • Well we have people here using Play with the Community version right now – Splaktar Apr 10 '15 at 20:37
  • @Splaktar Sorry, I did not mean to say that Play projects will not work with Intellij Community version, I was just responding to the first comment here. I haven't had a chance to test it with Community edition, only info I had was the official statement from JetBrains. – bravo2 Apr 13 '15 at 18:03
  • Should import work if we're using `project/Build.scala` instead of `build.sbt`? IDEA can't seem to figure out what JVM or SDK to use. – aij Oct 20 '15 at 22:09
1

Apparently, this is a bug in some versions of IntelliJ 14, that just got fixed (as of version 14.0.3). Updating IJ then updating the scala plugin seems to make things work.

0

In this case simply import manually the "build.sbt" from your project, so if the directory is ~/Documents/myPlayApp then choose to import ~/Documents/myPlayApp/build.sbt

Asher A
  • 327
  • 2
  • 3