Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
255 views
in Technique[技术] by (71.8m points)

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.

question from:https://stackoverflow.com/questions/8296280/use-sbt-to-build-pure-java-project

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...