opticyclic opticyclic - 6 months ago 39
Java Question

Use SBT To Build Pure Java Project

Historically I have used Ant+Ivy or Maven for building my Java projects.
I'm now looking at non-xml based solutions.

Gradle can compile, jar and publish my project with few issues.

Can I do the same with SBT?
If so, can you provide a simple example of using sbt to build a java only project.


Yes this is entirely possible. Nothing to setup really, a small build.sbt file should do the trick, something like:

organization := "your.group.id"

name := "Your project"

version := "1.0-SNAPSHOT"

libraryDependencies ++= Seq( <any normal jar deps> )

And run sbt package from the command line.