My question is about running an application that's in a project managed by sbt 0.10.1
and hence relies on its automatic dependency management (to download and set up appropriate classpath to run).
When using the automatic dependency management, it appears that the only way to run the application is using sbt itself because it knows how to set up the classpath (with a help of Ivy2).
How can I run the application without sbt?
You can also use Typesafe's xsbt-start-script-plugin (edit: now sbt-start-script) to generate a shell script with the correct class path:
This plugin allows you to generate a script
target/start
for a project. The script will run the project "in-place" (without having to build a package first).The
target/start
script is similar tosbt run
but it doesn't rely on SBT.sbt run
is not recommended for production use because it keeps SBT itself in-memory.target/start
is intended to run an app in production.The plugin adds a task
start-script
which generatestarget/start
. It also adds astage
task, aliased to thestart-script
task.
This is what Heroku uses to run Scala apps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With