How to specify JVM maximum heap size “-Xmx” for running an application with “run” action in SBT?

For forked processes you should look at Build.scala To modify the java options for forked processes you need to specify them in the Build.scala (or whatever you’ve named your build) like this: val buildSettings = Defaults.defaultSettings ++ Seq( //… javaOptions += “-Xmx1G”, //… ) This will give you the proper options without modifying JAVA_OPTS globally, … Read more

What is the difference between build.sbt and build.scala?

To give a brief example, this build.sbt: name := “hello” version := “1.0” is a shorthand notation roughly equivalent to this project/Build.scala: import sbt._ import Keys._ object Build extends Build { lazy val root = Project(id = “root”, base = file(“.”)).settings( name := “hello”, version := “1.0” ) } The .sbt file can also include … Read more

How can sbt pull dependency artifacts from git?

You can import unpackaged dependencies into your project from GitHub by treating them as project dependencies, using the dependsOn operator. (This is distinct from the way that precompiled library dependencies are included). Note that you can specify which branch to pull using # notation. Here’s some Scala SBT code that is working well for me: … Read more

How to see dependency tree in sbt?

If you want to actually view the library dependencies (as you would with Maven) rather than the task dependencies (which is what inspect tree displays), then you’ll want to use the sbt-dependency-graph plugin. Add the following to your project/plugins.sbt (or the global plugins.sbt). addSbtPlugin(“net.virtual-void” % “sbt-dependency-graph” % “0.9.2”) Then you have access to the dependencyTree … Read more

comparing sbt and Gradle [closed]

Note that one key difference between SBT and Gradle is its dependency management: SBT: Ivy, with a a revision which can be given as a fixed one (1.5.2, for instance) or as latest (or dynamic) one. See “Ivy Dependency” That means the “-SNAPSHOT” mechanism support can be problematic, even though Mark Harrah details in this … Read more

SBT stop run without exiting

From sbt version 0.13.5 you can add to your build.sbt cancelable in Global := true It is defined as “Enables (true) or disables (false) the ability to interrupt task execution with CTRL+C.” in the Keys definition If you are using Scala 2.12.7+ you can also cancel the compilation with CTRL+C. Reference https://github.com/scala/scala/pull/6479 There are some … Read more

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