snippetbashTip
sbt — Build tool for Scala and Java projects. More information: <https://www.scala-sbt.org/1.x/docs/>.
Viewed 0 times
commandbuildandscalaclitoolsbtfor
Problem
How to use the
sbt command: Build tool for Scala and Java projects. More information: <https://www.scala-sbt.org/1.x/docs/>.Solution
sbt — Build tool for Scala and Java projects. More information: <https://www.scala-sbt.org/1.x/docs/>.Start a REPL (interactive shell):
sbtCreate a new Scala project from an existing Giter8 template hosted on GitHub:
sbt new {{scala/hello-world.g8}}Compile and run all tests:
sbt testDelete all generated files in the
target directory:sbt cleanCompile the main sources in
src/main/scala and src/main/java directories:sbt compileUse the specified version of sbt:
sbt -sbt-version {{version}}Use a specific jar file as the sbt launcher:
sbt -sbt-jar {{path}}List all sbt options:
sbt -hCode Snippets
Start a REPL (interactive shell)
sbtCreate a new Scala project from an existing Giter8 template hosted on GitHub
sbt new {{scala/hello-world.g8}}Compile and run all tests
sbt testDelete all generated files in the `target` directory
sbt cleanCompile the main sources in `src/main/scala` and `src/main/java` directories
sbt compileContext
tldr-pages: common/sbt
Revisions (0)
No revisions yet.