play2 [2.1.2-scala Is it possible to change the scala version a play 2 project uses, i.e. upgrade from scala 2.10.0 to 2.10.2 - playframework-2.1

Is it possible to do that, so that I see sth. like the following:
_ _
_ __ | | __ _ _ _| |
| '_ \| |/ _' | || |_|
| __/|_|\____|\__ (_)
|_| |__/
play! 2.1.2 (using Java 1.7.0_25 and Scala 2.10.2), http://www.playframework.org
Or is that not supported, i.e. for compatibility reasons?
I tried setting it in the build file directly, i.e.:
val main = play.Project(appName, appVersion, appDependencies).settings(
scalacOptions += "-feature",
resolvers += "Big Bee Consultants" at "http://repo.bigbeeconsultants.co.uk/repo",
scalaVersion := "2.10.2"
).dependsOn(common).aggregate(common)
but that does not change anything.

Found the solution via a hint from the google group, see it here: https://groups.google.com/forum/#!topic/play-framework-dev/vXbkCEvJrkQ
The solution is to actually set the scala version in the build file like posted in the question above. The play sbt plugin does not show the correct scala version but if you type the "console" command in sbt you will see the correct scala version.
This has only tested if you run play from sbt directly. I do not know if it works with a downloaded play framework zip file.
Also I'm still not 100% convinced that it uses that version to compile the stuff.

Related

Kotlin incompatible when creating Micronaut command line applications

Whenever I attempt to create a command line app with Micronaut and Kotlin using:
mn create-cli-app cli2 --features kotlin
I get the following warning:
| Warning The following features are incompatible with other feature selections and have been removed from the project
| kotlin
The generated project has fallen back to Java, which is very graceful.
Is this a "bug" or current expected behaviour?
For selecting the language (java, groovy or kotlin) it is better to use the --lang flag instead of --features.
Doing:
$ mn create-cli-app mycli --lang=kotlin
| Generating Kotlin project...
| Application created at /tmp/mycli
Works as expected.

Configure IntelliJ Ultimate to understand ES6 Syntax

I'm using Intellij Idea Ultimate 2019.1 for an AngularJS Project. Whenever I use ES6 syntax within my project, like declaring a const variable, IntelliJ puts a red underline under const with the message:
JSHint: 'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz). (W104)
How do I follow the suggestion so the IDE understands ES6 syntax and no longer shows me those warnings?
You can disable it in Settings | Languages & Frameworks | JavaScript | Code Quality Tools | JSHint or you can attach .jshintrc to your project and add this
{
"esversion": 6
}
Hope it helps.
Updated setting:
Settings | Languages & Frameworks | JavaScript | Code Quality Tools | JSHint | Enforcing Options:
Warn about incompatibilities with the specified ECMAScriptversion: [add 6 here]

No Java EE application template in IntelliJ

Trying to create Java EE poject in InteliiJ, but can't find template for it:
I was expecting something like:
Where JavaEE is gone?
There could be several reasons. You could try the following:
Update your JavaEE-plugins. Look in [ File > Settings.. > plugins > updates].
Invalide Caches [File > Invalidate Caches/Restart... ]
Open your idea.log with [Help > Show Log in Explorer] and look for errors and post it here.
Have you changed your Java version? Installed it in a different directory?
Look if your environment variables 'JAVA_HOME' is set to the correct version.
Enterprise templates are only available in the paid ultimate version of intellij.
So, you can either switch to Netbeans or eclipse to use those features for free.

SBT + Idea 13 => Cannot resolve symbol

I'm using SBT + Idea 13.1.1 and I have all my SBT file in red:
name := "Transformer"
version := "1.0"
libraryDependencies ++= Seq(
"com.github.scopt" %% "scopt" % "3.2.0",
"org.scalatest" % "scalatest_2.10" % "2.1.0" % "test"
)
It's saying
Cannot resolve symbol name/version
But Seq is ok. But it's all good to run the app from SBT cmd or even from Idea directly running the main or scalatests. I know it's not a lot information to troubleshoot but I don't know what to check else. Tell me if you have an idea I'll provide everything.
Cheers
To fix this, remove the folder .idea and reimport the project.
The root cause remains a mystery...
I had a similar problem when I updated to SBT 0.13.7. IntelliJ started marking operators such as := and ++ in red with message "Cannot resolve symbol"
My steps to fix this solution were as follows:
In IntelliJ under Files | Settings, I switched my SBT Runner to use a Custom Launcher (and gave my path to sbt-launch.jar which for me was /opt/sbt/bin/sbt-launch.jar).
After testing that I can still compile after #1 above, I then had to invalidate the cache and restart; under Files | Invalidate Caches / Restart...
That's it! :-)
In case none of the other solutions work and you are in the same boat as me, where you see a Cannot resolve symbol ... in the build.sbt and all files that have sbt dependencies, and where there are no sbt dependencies in External Libraries, running File | New | Module from Existing Sources... and selecting the build.sbt may fix it for you as it fixed it for me.
I had a similar problem on 14.1.2; in my case adding
libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.1" % "test"
and then trying to
import org.scalatest._
Would resulted in: cannot resolve symbol scalatest
Downgrading sbt (0.13.8 -> 0.13.7); in build.properties solved the problem.
here are more details.
Updating my build.properties from 0.13.8 to a newer version, like 0.13.15, solved it for me. Reference github issue.
Had the same problem in IDEA 14.0. Nothing above worked.
Upgrade to IDEA 14.1.1 did the trick.
Restarting IntelliJ fixed it for me.
It was about the .idea folder, if it is not included the codeStyles, Modules, libraries , it is giving that error. I fix it with import that folder from another project that has it.Then restart IntelliJ.

Eclipse JVM Version won't change

I need to get my eclipse install to use 1.7 update 51. I've installed both JRE and JDK's matching this version for 64 and 32 bit. If I change the vm in eclipse.ini I get an error code 1 saying eclipse cannot be started. If I change the compliance level in window -> preferences then it says that it's changed but after writing a simple application and running it in eclipse using RuntimeMXBean I'm being told 24.51-b03 is being used. I would assume this means update 51 is in use but my workspace is still complaining about major/minor version mismatches.
Any help/insight is appreciated
edit:
Here is the output of
public static void main(String[] args) {
RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();
String jvmArgs = runtimeMXBean.getVmVersion();
System.out.println(runtimeMXBean.getSpecVersion() + " " + runtimeMXBean.getVmVersion());
}
1.7 24.51-b03
Figured it out, kinda. I built my jar with 1.7 update 51 and was using in a project with 1.7 update 51. No idea why it wasn't working, I just downgraded to 1.6 on the jar I built and it works.