Debugging Scala code with simple-build-tool (sbt) and IntelliJ

There’s a very convenient -jvm-debug flag in the official SBT packages for Mac, Linux & Windows. You can use the flag to specify the debug port: sbt -jvm-debug 5005 Under the covers, this starts the JVM for SBT with the typical verbose debugging incantation: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 You now can run your code as normal, for … Read more

How can I check the SBT version?

sbt –version It now works as of version 1.3.3+ (credit to @ElectronWill). You may also want to use sbt about that (copying Mark Harrah’s comment): The about command was added recently to try to succinctly print the most relevant information, including the sbt version.

How to access test resources in Scala?

Resources are meant to be accessed using the special getResource style methods that Java provides. Given your example of data.xml being in $SBT_PROJECT_HOME/src/test/resources/, you can access it in a test like so: import scala.io.Source // The string argument given to getResource is a path relative to // the resources directory. val source = Source.fromURL(getClass.getResource(“/data.xml”)) Of … Read more

Build.scala, % and %% symbols meaning

From the official documentation: http://www.playframework.com/documentation/2.1.1/SBTDependencies Getting the right Scala version with %% If you use groupID %% artifactID % revision instead of groupID % artifactID % revision (the difference is the double %% after the groupID), SBT will add your project’s Scala version to the artifact name. This is just a shortcut. You could write … Read more

How to “re-run with -deprecation for details” in sbt?

sbt shell While in sbt shell (if you don’t want to change your build.sbt): $ sbt > set ThisBuild/scalacOptions ++= Seq(“-unchecked”, “-deprecation”) > compile > exit Due to in ThisBuild, set applies the settings to all sub-projects, as well. Command Line You could also run the above as a single command on command line. sbt … Read more

How to check sbt version?

$ sbt –version Now works as of version 1.3.3+ (credit to @ElectronWill). You may also want to use sbt about that (copying Mark Harrah’s comment): The about command was added recently to try to succinctly print the most relevant information, including the sbt version.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)