top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Pros and cons of using sbt vs maven in Scala project

+3 votes
979 views

Which build tool is the best for Scala? What are the pros and cons of each of them? How to I determine which one of them to use in a project?

posted Jun 28, 2016 by Shivam Kumar Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

We're using Maven to build Scala projects at work because it integrates well with our CI server. We could just run a shell script to kick off a build, of course, but we've got a bunch of other information coming out of Maven that we want to go into CI. That's about the only reason I can think of to use Maven for a Scala project.

Otherwise, just use SBT. You get access to the same dependencies (really the best part about maven, IMHO). You also get the incremental compilation, which is huge. The ability to start up a shell inside of your project, which is also great.

ScalaMock only works with SBT, and you're probably going to want to use that rather than a Java mocking library. On top of that, it's much easier to extend SBT since you can write full scala code in the build file, so you don't have to go through all the rigamarole of writing a Mojo.

In short, just use SBT unless you really need tight integration into your CI server.

answer Jun 29, 2016 by Karthick.c
...