How to fix sbt reporting “Error wrapping InputStream in GZIPInputStream: java.io.EOFException”?

It appears that the exception has been due to some problems with the local repo. After cleanup, e.g. removing target directories from ~/.sbt directory it’s now working fine. jacek:~/.sbt $ find . -name target | xargs rm -rf jacek:~/sandbox/stackoverflow/testaaa $ sbt [info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins [info] Updating {file:/Users/jacek/.sbt/0.13/plugins/}global-plugins… [info] Resolving org.fusesource.jansi#jansi;1.4 … [info] … Read more

How can I get complete stacktraces for exceptions thrown in tests when using sbt and testng?

Using hints found in the documentation here: (quoted) You can configure the output shown when running with sbt in four ways: 1) turn off color, 2) show short stack traces, 3) full stack traces, and 4) show durations for everything. To do so you must pass a -o argument to ScalaTest, and after the -o, … Read more

How to publish jar to local repository?

The publishLocal action is used to publish your project to a local Ivy repository. By default, this local repository is in ${user.home}/.ivy2/local. You can then use this project from other projects on the same machine source EDIT: Sorry I misread your question. Here is an example to publish a jar or sources to your local … Read more

What’s recommended .gitignore for Scala/sbt project in IntelliJ IDEA?

EDIT After discovering Joe: Just ask Joe to take care of your .gitignore Original Answer: Since you’re using Scala you should add: target *.class These can be generated back easily and could be machine dependent. If you’re going to use IntelliJ then the following: *.iml *.ipr *.iws .idea out The .idea folder and the .iml … Read more

How do you remove the _ postfix from artifacts built+published with simple-build-tool?

After looking around how Artifact.artifactName is implemented and ultimately used it seems that the way to turn this off is to specify false for the crossPath setting. This is documented in one of the quick configuration examples on the xsbt wiki. http://www.scala-sbt.org/release/docs/Examples/Quick-Configuration-Examples // disable using the Scala version in output paths and artifacts crossPaths := … Read more

Can I access my Scala app’s name and version (as set in SBT) from code?

sbt-buildinfo I just wrote sbt-buildinfo. After installing the plugin: lazy val root = (project in file(“.”)). enablePlugins(BuildInfoPlugin). settings( buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion), buildInfoPackage := “foo” ) Edit: The above snippet has been updated to reflect more recent version of sbt-buildinfo. It generates foo.BuildInfo object with any setting you want by customizing buildInfoKeys. Ad-hoc … Read more

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