I have the following dependencies added to my Build.scala and they work perfectly (no compilation errors), but Intellij IDEA 12 doesn't recognize them. It shows them red highlighted.
"com.google.inject" % "guice" % "3.0",
"com.typesafe" %% "play-plugins-mailer" % "2.1-RC2"
It is quite annoying as you can see :)
Is it possible to fix it? In google guice case, I put its jars into /lib folder (so I have the library twice, one in /lib and the other in /target folder) and then IDEA doesn't show errors for it, but I don't like this workaround and can't do the same for the Mailer plugin.
Thanks for your help.
In the Project tool window, in the project source root directory, select New | File to create the plugins. sbt file. Open the plugins. sbt file in the editor and add the Play 2 plugin.
IntelliJ IDEA enables creation of JAR as an artifact of a project. Do the following steps. From the Project Structure window, navigate to Artifacts > the plus symbol + > JAR > From modules with dependencies.... In the Create JAR from Modules window, select the folder icon in the Main Class text box.
To install Scala plugin, press Ctrl+Alt+S , open the Plugins page, browse repositories to locate the Scala plugin, click Install and restart IntelliJ IDEA.
You have to rerun the play idea
command in order to get IntelliJ to know that there are new dependencies added.
I normally enter the play
CLI and then run:
idea no-sbt-build-module with-sources=yes
This will download the sources for the dependencies (if they exist) and also make sure that the output path will be correct and that modules are not loaded several times.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With