Failed to refresh gradle project in IntelliJ IDEA 2016.1: Unknown method ScalaCompileOptions.getForce() - scala

I have a Gradle-based project primarily with Java code and a small subproject with Scala (a Gatling-based performance test).
I recently upgraded Gradle wrapper to v2.12, which is currently the latest version.
And today I just updated IntelliJ Idea from v15 to v2016.1.
When I try to refresh the project from the Gradle files in Idea, I get this error.
Error:Cause: org.gradle.api.tasks.scala.ScalaCompileOptions.getForce()Ljava/lang/String;
I noticed when searching on Google, that the method getForce() (returning a String) apparently has been replaced by isForce() (returning a boolean).
If i downgrade Gradle wrapper to v2.11 the problem disappears.
Is there anything else I can do to fix the problem?

I guess there is nothing except downgrade you can do. Just report your problem on Jetbrains issue tracker

This seems to have been fixed as per release notes published in https://confluence.jetbrains.com/display/IDEADEV/IntelliJ+IDEA+2016.1+145.844.1+Release+Notes. See IDEA-152976.
One needs to switch to IntelliJ IDEA 2016.1 145.844.1

Reinstall the Scala plugin in intellij solved the problem for me.

Related

Unrecognized repository Scala Plugin Bundled Repository

When creating a fresh Scala SBT project in IntelliJ, I get this warning on sbt reload:
[warn] Unrecognized repository Scala Plugin Bundled Repository, ignoring it
I am aware that it is only a warning. What does it mean, and how do I resolve it?
SBT version 1.6.2,
Scala version 2.12.16.
This warning usually means there are some leftovers from a previous Scala plugin update which didn't finish successfully. Trying to update or reinstall your Scala plugin should fix the issue. Trying to change your Scala version might also make it go away.
In the end it's a harmless warning; if it does not causes any issue in your program, you can forget about it.
I have the same warning for quite some time, I have no idea what it means and I ignore it. without experiencing any adverse effects in my project.
"Repair IDE" in IntelliJ's File menu fixed it for me

Why does Scala compilation get stuck in IntelliJ IDEA 13.1.3?

I'm using IntelliJ IDEA 13.1.3 and am trying to compile a Scala 2.10.4 project. It compiles for a while, then the compile process hangs.
I can compile and run my project from the sbt console.
I already invalidated caches, cleaned the project, reinstalled IntelliJ IDEA and all plugins.
Any ideas why Intellij behaves like this?
The problem was the Play Framework plugin. Uninstalling it did the trick.
Alternatively, you can try the Community Edition, as it does not have Play support at all.

Plugin classpath issues when running from IDE

I have a maven plugin that transforms class bits after compilation. This plugin works precisely as designed when run from the command line. However, the problem arises in Eclipse (3.6.1) when the Maven project is building from a clean state. What happens is that I get an error message in the console informing me that my plugin has failed due to the inability to find a class that is in fact on the classpath.
As I mentioned, this plugin works perfectly well when I build from the command line, so this is a rather annoying problem that seems a bit difficult to track down.
Has anyone else ran into this problem before, and if so, is there a solution that I'm missing?
Thanks.
I can confirm that the maven eclipse plugin sometimes works different than the "console version". You can try to change the "Preferences->Maven->Installations" to your external maven installation (that what you use when running from command line). The eclipse plugin embedded version is a 3.0-SNAPSHOT (in my installation) and maybe not stable in all points.
The issue turned out to be a difference between Maven 2.x and Maven 3.x. The m2eclipse was using a version of Maven 3.x - can't remember which - and I was running a previous version. Apparently, somewhere in the version range, the plugin mojo now requires #requiresDependencyResolution . Thus, when running in m2eclipse, my plugin was not getting any of the dependencies in the project, and thus the class path was completely boned...
word...

Scala IDE error - "projectname" is not a Scala project -

I have installed latest scala ide plugin to eclipse (Version: 3.4.2). It seems installation is ok without any errors.
I am able to create a scala project and add a package, but i couldn't add scala object, at the time it shows "projectname" is not a Scala project error message in add object dialog.
I have googled and found it could be related to JDT Weaving not enabled in eclipse. I have verified, its enabled and running in my environment.
Below the screenshot of the error.
alt text http://a.imageshack.us/img80/3070/scala.png
I just started scala.. Can someone help me to resolve this problem?
I had a similar error two minutes ago. Here's how I fixed it. I'm using Helios and the relevant Scala IDE version.
Right click on the project name --> Configure --> Add scala nature
I must mention that I have the M2Eclipse plugin as well and my project is a Maven project in addition to having a Scala "nature" .. Not that it should matter .. ;-)
The error message means your project is not recognize as a Scala one (as detailed in the scala.tools.eclipse.wizards.AbstractNewElementWizardPage.scala class.
But adding "Scala nature" to your project, as suggested by Alexey Romanov in the comments, might not be enough in this case.
The requirements mentioned in scala-ide.org clearly include:
Java Developer Toolkit 1.6
Eclipse Classic 3.5.2
So could you try with a more recent Eclipse version?
See Requirements and Installation, and then the turorial:
As mentioned, note the 'S' in the Scala project icon.

Stable Scala 2.8 plugin

Does anyone know if there exists a stable version of the Scala plugin for eclipse, running with Scala 2.8 (any version of scala 2.8...RC or beta or whatever).
I like the fact that it compiles 10 times faster than the netbeans plugin, but it is very unstable, and auto-imports doesnt work. Also, sometimes it cant find classes when I hit "run", then I have to clean it again. This is with some random nightly build of the 2.8 eclipse scala plugin.
Is there a stable version? If so, can you link me to it?
Thanks in advance :)
The main web site for Scala Eclipse plugin is now at www.scala-ide.org
You can try the plugin for 2.8.0 RC2 with this update p2 site
(not browsable: copy http://www.scala-lang.org/archives/downloads/distrib/files/scala-plugin-rc/)
As for a truly stable version, that plugin is not there yet, but as Miles Sabin once told me (Sept. 2009): "Looking forward to receiving your contributions."
And he was quite snappy about it too ;) But that was enough to convince my hierarchy that is was too early to invest in Scala at the time: too large eclipse user-base in our department, and no real Scala support/documentation at the time on Eclipse.
In all fairness, the contribution and developer documentation is now much richer than it once was.
I have been using it since release, and found 2.8.0 RC2 (link given by VonC) to be quite stable (certainly a lot more than 2.7.7).
I was using eclipse 3.5.2 with the 2.8.0 RC2 plugin which created a lot of problems with compiling. I had to unistall the plugin and still the problems would remain. Only after a numbers of attempts to clean/build/delete/re-import the project and restart eclipse solved the problems...