Questions tagged [sbt]

sbt is an open source build tool for Scala and Java projects, similar to Java's Maven or Ant.

  • Fast and unintrusive to build simple projects.
  • Supports multiple projects/modules, external projects and other advanced setups.
  • Configuration, customization, and extension are done in Scala.
  • Dependency management support: inline declarations, external Ivy or Maven configuration files, and manual library management.
  • Supports mixed Scala/Java projects, packages jars, generates documentation with scaladoc.
  • Plugin framework for customized integrations (i.e. web app servers, IDEs, ORMs).
  • Supports testing with ScalaCheck, specs, and ScalaTest (JUnit is supported by a plugin).
  • Continuous compilation and testing with triggered execution.
  • Accurate recompilation is done using information extracted from the compiler.
  • Starts the Scala REPL with project classes and dependencies on the classpath.
  • Parallel task execution, including parallel test execution.

Official repository at GitHub

Official website

Stack Overflow sbt Tutorial

  1. General
  2. Dependency management
  3. Multiproject builds with .sbt files
  4. Publishing
  5. Cross-building
  6. Logging
  7. Using plugins
  8. sbt-assembly
  9. Developing tasks
  10. Developing plugins
  11. Developing commands
  12. Outside sbt
9338 questions
5
votes
2 answers

How to link Java API classes using apiMappings?

How do you link to Java classes in sbt using apiMappings? This is my code below which works for various dependencies, but I'm unclear how to link to Java standard library classes? apiMappings ++= { def findManagedDependency(organization: String,…
Taylor Leese
  • 46,410
  • 27
  • 106
  • 138
5
votes
1 answer

How to run specific tests using SBT Jenkins Plugin for ScalaTest test

Currently we are using IntelliJ, Scala, SBT to kick off our tests in our local enviroment. With SBT command line, we can specify specific test, suites, wildcards, as instructed here: ScalaTest.org Page Such as "test-only *RedSuite" However on our…
user1697841
  • 109
  • 1
  • 10
5
votes
2 answers

How to know available tasks and settings of installed plugin in sbt?

Given the following setup with the sbt-git plugin: > about [info] This is sbt 0.13.2 [info] The current project is {file:/Users/jacek/oss/sbt-git/}sbt-git 0.6.4-SNAPSHOT [info] The current project is built against Scala 2.10.3 [info] Available…
Jacek Laskowski
  • 64,943
  • 20
  • 207
  • 364
5
votes
1 answer

SBT create sub-projects using a collection

I've been searching if this is possible for a while with little success. Using SBT, can you create a sub-project programmatically, without explicitly assigning each project to it's own val? My current project structure looks something like…
Snnappie
  • 178
  • 1
  • 7
5
votes
2 answers

How to import multi-module project in IntelliJ IDEA?

I'm used to Spring and Maven projects where I set up a multi-module project in Maven with projects like: app-web app-models app-services app-common I'm now getting into using Play Framework 2 (Scala) and sbt. Is there a similar concept with Play…
Blankman
  • 236,778
  • 296
  • 715
  • 1,125
5
votes
2 answers

How do you exclude conf folder in sbt dist task

I am trying to create a package using sbt-native-packager without the conf folder being in the project jar. I have my conf folder included as such: resourceDirectory in Compile <<= baseDirectory(_ => new File("conf")) This include the conf files in…
Dimitry
  • 4,284
  • 6
  • 24
  • 40
5
votes
1 answer

Running ScalaTest suites (not tests) in parallel in sbt?

I use SBT 0.13.1 and want to run ScalaTest test suites in parallel (not tests within each suite). I do not have parallelExecution in Test := false set, but it looks like test suites are run in serial order. The experiment I did was: class BlahSuite…
rxin
  • 1,736
  • 15
  • 24
5
votes
1 answer

Propagating exit code from exec'd batch file back to ant

I need to call sbt from ant. I'm doing this with the "exec" task as follows: I need the ant task to "fail" if the…
JimN
  • 3,007
  • 19
  • 34
5
votes
1 answer

How to run task before all tests from all modules in sbt

I have a multi-module Play! application built with sbt and I have a problem on CI server with parallel tests and evolutions: when sbt starts tests and first starts evolution script, other fails because of "Database 'default' is in inconsistent…
Keros
  • 353
  • 1
  • 11
5
votes
1 answer

Play Framework: Configuring system properties

In play framework (2.2.1 & sbt 0.13) I have an IntegrationSpec that brings up a TestServer. I need to be able to set SSL specific System Properties for the TestServer. So far the only way I have been able to set it up correctly is passing them as…
Prasanna
  • 3,483
  • 7
  • 41
  • 71
5
votes
2 answers

SBT plugin dependency resolution fails with com.typesafe.play#sbt-plugin;2.2.1: not found

I've a Play app and when I ran sbt, I got an error as follows: [warn] http://repo.typesafe.com/typesafe/releases/com/typesafe/play/sbt-plugin/2.2.1/sbt-plugin-2.2.1.pom [info] Resolving org.fusesource.jansi#jansi;1.4 ... [warn] …
Qiang Li
  • 9,711
  • 15
  • 72
  • 134
5
votes
1 answer

Using System.getenv to set ProjectRef in build.sbt in Play?

I'm using an OTHER_HOME environment variable to point to a different SBT project directory. I'm going to put the external directory in maven repository or via a github.com#tag project reference, but for now I'd like to add a file-based dependency to…
Jaap
  • 2,802
  • 2
  • 26
  • 48
5
votes
1 answer

Have sbt put javadocs and sources of dependencies on the class path

When using a managed dependency, I can tell sbt to download the javadocs and sources: "mygroup" % "mymodule" % "myversion" withJavadoc() withSources() But these jars don't seem to be on the runtime classpath? What I would like to do, is access the…
0__
  • 64,257
  • 16
  • 158
  • 253
5
votes
2 answers

How to share application.conf file between subprojects?

I'm using Play Framework 2.2.1 and have a project named "management" with one subproject named "security" (I used the tutorial located here ). Here's my project structure: management + app + controllers + models + views + conf …
segaco
  • 1,166
  • 5
  • 16
  • 29
5
votes
1 answer

SBT gives "class file has wrong version 51.0, should be 49.0" when compiling a mixed project?

EDIT: Various SBT options show scalacOptions List(-deprecation, -unchecked, -encoding, UTF-8, -Yinline-warnings, -feature) show javaOptions List() about [info] This is sbt 0.13.1 [info] The current project is…
user2943976
  • 71
  • 1
  • 4
1 2 3
99
100