Where can I set proxy for SBT in Intellij IDEA?
Add -Dhttp.proxyHost=<proxy_server> -Dhttp.proxyPort=<proxy_port> to VM parameters Read documentation for more info
Add -Dhttp.proxyHost=<proxy_server> -Dhttp.proxyPort=<proxy_port> to VM parameters Read documentation for more info
Please use the publishM2 task. Its documentation says “Publishes artifacts to the local Maven repository”. sbt publishM2
It’s quite easy to use Gradle with Scala. We did it for a long time (a mixed team of Java, Groovy and Scala developers) and have been quite happy with it. Most things work quite well out of the box. More about Gradle with Scala: http://www.gradle.org/docs/current/userguide/scala_plugin.html There are some problems/downfalls though: Mixed code compilation when … Read more
If these warnings are for dependencies you use directly in your code, you should definitely add the upgraded version to your libraryDependencies. For evicted transitive dependencies (those dependencies only used directly by your own dependencies), it’s likely best to simply leave the warnings in place. This provides documentation to you about possible incompatibilities in your … Read more
excludeDependencies += “org.slf4j” % “slf4j-jdk14”
You can find some answers in External Processes in the official documentation of sbt, e.g. To run an external command, follow it with an exclamation mark !: “find project -name *.jar” ! Don’t forget to use import scala.sys.process._ so ! can be resolved as a method of String. Do the following in activator console (aka … Read more
SBT is slow because compiles internal code that is done in Scala and Scala compilation is slow because is a complex language (but once Scala is compiled is a lot faster at runtime) You can give SBT a boost when using SBT 1.x version with the SBT server. The SBT server allows you to use … Read more
Extending an existing task is documented the SBT documentation for Tasks (look at the section Modifying an Existing Task). Something like this: compile in Compile <<= (compile in Compile) map { _ => // what you want to happen after compile goes here } Actually, there is another way – define your task to depend … Read more
In the SBT project class there should be a line: // Declare MySQL connector Dependency val mysql = “mysql” % “mysql-connector-java” % “5.1.12” This will import the JDBC driver JAR file for MySQL. Did you load the driver? If you use this Util class to fetch the connections, the driver will be loaded exactly one … Read more
SBT is tied to a specific project defined by a build.sbt file in a way that $ sbt console will load up the same REPL environment as $ scala but with the addition of all of the project code and dependencies defined in the build available for import. Also, it will use the version of … Read more