How to change setting inside SBT command?

With the help from sbt mailing list, I was able to create a solution as follows: def publishSnapshot = Command.command(“publish-snapshot”) { state => val extracted = Project extract state import extracted._ val eVersion = getOpt(version).get // getting current version runTask(publish in Compile, append(Seq(version := “newVersion”), state), true ) state }

Spark2.1.0 incompatible Jackson versions 2.7.6

Spark 2.1.0 contains com.fasterxml.jackson.core as transitive dependency. So, we do not need to include then in libraryDependencies. But if you want to add a different com.fasterxml.jackson.core dependencies’ version then you have to override them. Like this: name := “testSpark2” version := “1.0” scalaVersion := “2.11.8” dependencyOverrides += “com.fasterxml.jackson.core” % “jackson-core” % “2.8.7” dependencyOverrides += “com.fasterxml.jackson.core” … Read more

How to force SBT to use Java 8?

You need the following on your build.sbt file. javacOptions ++= Seq(“-source”, “1.8”, “-target”, “1.8”, “-Xlint”) initialize := { val _ = initialize.value val javaVersion = sys.props(“java.specification.version”) if (javaVersion != “1.8”) sys.error(“Java 1.8 is required for this project. Found ” + javaVersion + ” instead”) }

Which version of Java does SBT use?

You can use eval at the sbt prompt with the appropriate system properties: > eval System.getProperty(“java.version”) [info] ans: String = 1.7.0_45 > eval System.getProperty(“java.home”) [info] ans: String = /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre (The other answers are fine too, this is just another method.)

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