3

It's been two days and this nightmare is still going on. I am a newbie in Play.

I can create my play project, compile it and run using command.

But when ever I try to import or open it using Intellij Idea, I get the following error.

enter image description here

I cannot do activator idea from the command line either as mentioned here. When I do, I get this.

enter image description here

I was able to do the import work yesterday which stopped due to some changes in build.properties and plugins.sbt files. Now the files look like this when I create a new one.

plugin.sbt

// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.2")

// Web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.6")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.7")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0")

// Play enhancer - this automatically generates getters/setters for public fields
// and rewrites accessors of these fields to use the getters/setters. Remove this
// plugin if you prefer not to have this feature, or disable on a per project
// basis using disablePlugins(PlayEnhancer) in your build.sbt
//addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0")

// Play Ebean support, to enable, uncomment this line, and enable in your build.sbt using
// enablePlugins(SbtEbean). Note, uncommenting this line will automatically bring in
// Play enhancer, regardless of whether the line above is commented out or not.
// addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0")

build.properties

#Activator-generated Properties
#Thu Jul 09 08:03:01 NPT 2015
template.uuid=4908845b-9453-410b-af0f-404c1440dff1
sbt.version=0.13.8

Then the project crashed somehow. Now I cannot import the project.

I sense the problem is in the IDE side.

Community
  • 1
  • 1
Nabin
  • 11,216
  • 8
  • 63
  • 98

1 Answers1

0

The actual answer will be given in the idea.log as mentioned in Alexander's comment above - the IntelliJ error dialog leaves a lot to be desired.

From the migration guide

Play no longer includes the sbteclipse or sbt-idea plugins, which enables users to upgrade IDE support independently of Play.

IntelliJ is now able to import sbt projects natively, so we recommend using that instead. Alternatively, the sbt-idea plugin can be manually installed and used, instructions can be found here.

You can follow the link from the migration guide, and add the idea plugin back into sbt.

Normally, however, you should be able to do exactly what you were doing.

  1. Install the Scala plugin if you haven't already - this gives support for not just Scala, but Play and sbt
  2. "File" > "Open" > select build.sbt
  3. The project will be imported into IntelliJ
Community
  • 1
  • 1
Steve Chaloner
  • 8,162
  • 1
  • 22
  • 38