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
3 answers

IntelliJ not resolving Play's build.sbt libraryDependencies

I am new to IntelliJ IDE and I am trying to use it for a new Play project I am working on. I have added some libraries to the libraryDependencies in build.sbt but IntelliJ cannot seem to resolve them as External Libraries libraryDependencies ++=…
Wextux
  • 752
  • 9
  • 17
5
votes
1 answer

Play Framework - How to maintain configuration files for different environments?

For my Play 2.2/Scala application (built with SBT), I would like to deploy different configuration files depending on the environment I'm deploying to (e.g. to couple a deployment with a particular database server). How does one create different…
aknuds1
  • 57,609
  • 57
  • 177
  • 299
5
votes
1 answer

Configuring IntelliJ IDEA with background compilation for Specs2 tests?

According to the blog entry on IntelliJ Scala plugin blog, Scala compilation happens in external process. But whenever I run Specs2 tests, it builds the whole project which takes from 1 to 3 minutes. How to configure Specs2 tests to run correctly in…
user2745006
5
votes
2 answers

How to change JDK set by SBT import in IntelliJ IDEA?

When Scala plugin reimports an SBT project in IntelliJ IDEA, it changes the project's JDK to 1.6. Is it a way to choose which JDK version Scala plugin sets during reimport of the STB project.
Jacek L.
  • 1,326
  • 12
  • 17
5
votes
2 answers

SBT run code in project after compile

we need to run some code after the compile step. Making things happen after the compile step seems easy: compile in Compile <<= (compile in Compile) map{x=> // post-compile work doFoo() x } but how do you run something in the freshly…
Channing Walton
  • 3,737
  • 1
  • 27
  • 55
5
votes
2 answers

Custom 'run' like task for for a project

By default, the run task for my SBT build executes my main class found (automatically) in src/main/scala/. How can I add a new task for a project that behaves just like the run task but finds a main class in src/util/scala? The task should run the…
Andy
  • 4,768
  • 3
  • 24
  • 36
5
votes
1 answer

Using Spring-Data-Neo4j advanced mapping mode in SBT

I'd like to use the advanced mapping mode of spring-data-neo4j in my Scala SBT project (hosted on github): I can store Nodes in the database with the repository, but I cannot make the aspectj-weaving work. This is what I have so…
Felix Dietze
  • 542
  • 6
  • 15
5
votes
1 answer

NoSuchMethodError when running Checkstyle 5.5 in Play 2.2 project?

I previously had Checkstyle implemented as an sbt task in Play 2.1. As of Play 2.2, I get the following error: [error] (*:checkstyle) java.lang.NoSuchMethodError: …
5
votes
1 answer

SBT: Cannot publish to Apache Archiva

Error message: java.io.IOException: Access to URL http://maven.company.com/repository/internal/com/company/ project_2.10/0.0.3/project_2.10-0.0.3.pom was refused by the server: Unauthorized Running Apache Archiva 1.4-M4(latest), I am…
flavian
  • 26,242
  • 10
  • 57
  • 95
5
votes
1 answer

How to resolve a non-jar (dll/jnilib) library dependencies in sbt?

In a SBT build.sbt project file, is it possible to retrieve library dependencies which are not bundled as jar? In my case, I am trying to use QTSampledSP which requires .dll and .jnilib libraries.
Mark Jayxcela
  • 925
  • 1
  • 7
  • 17
5
votes
1 answer

Ensuring ScalaTest does not run in parallel

How can I ensure scalatest tests do not run in parallel? Prior to 0.12 I had an sbt setting: parallelExecution in Test := false Newer versions introduced some complex mechanism. Will this simpler, old way still work with 0.13? I don't want…
Greg
  • 8,498
  • 15
  • 54
  • 85
5
votes
1 answer

What's the difference between project/build.sbt and project/BuildApp.scala?

What's the difference between project/build.sbt and project/BuildApp.scala? Can I create any of them interchangeably?
アレックス
  • 24,309
  • 37
  • 129
  • 229
5
votes
1 answer

SBT Resolvers work in build.sbt, not working in Build.scala

Once upon a time, in a far off land, there existed a project with a little project/build.sbt file that looks like this: resolvers += Resolver.url("scala-js-snapshots", …
Li Haoyi
  • 13,576
  • 15
  • 69
  • 130
5
votes
2 answers

sbt does not resolve Typesafe repository

I have an odd problem with sbt and the Typesafe repository: [info] Resolving com.typesafe.play#play-json_2.10;2.2.0 ... [warn] module not found: com.typesafe.play#play-json_2.10;2.2.0 [warn] ==== local: tried [warn] …
0__
  • 64,257
  • 16
  • 158
  • 253
5
votes
1 answer

How to install sbt-idea and use gen-idea

I have downloaded and installed sbt and plugin for gen-idea. But the built projects can not be run on idea. Also the "project" folder is not generated when I run gen-idea. Can someone please tell me how I should install sbt and sbt-idea plugin and…
bula
  • 7,115
  • 5
  • 22
  • 39
1 2 3
99
100