For more information on using Activator, visit: http://lightbend.com/activator
Activator aims to be a friendly one-stop-shop to bootstrap your Scala, Akka, and Play development. It can be used as a wrapper script that launches into traditional command line sbt, but it also includes a template and tutorial system, and an optional GUI for getting started.
You can think of Activator as traditional sbt (
activator <sbt command here>), plus an optional UI mode
activator ui), plus a template system (
Activator Developer Documentation
Running the UI
sbt> project activator-ui sbt> run
Running from the Launcher
Stage the distribution:
Force the launcher to use the newly built launcher:
rm -r ~/.activator
Here are some potential issues with running a local Launcher:
Stale cache: On it's own,
dist/target/stage/activatorshould work. However, there are several caches between the developer and running
dist/target/stage/activator. If it seems like your built version is not running, try clearing out the following caches:
Also, the artifacts generated during the build process can become a problem. In your activator repo directory, you can run
git clean -X -d -f to clear them.
There are two types of tests: Unit tests and integration tests.
To run unit tests, simply:
To run the tests of a particular project, simply:
To run a specific test, simply:
sbt> test-only TestName
To run all the integration tests, simply:
This also runs offlineTests.
Staging a distribution
Note: just stage will also run
Generates a distribution in the
dist/target/stage directory. This will use a launcher version based on the current git commit id. To rebuild a new launcher remove your
Building the Distribution
Activator is versioned by either the current git tag or if there isn't a tag, the latest commit hash. To see the current version that Activator will use for the distribution run:
sbt show version
To create a distribution optionally create a tag and then run:
This generates the file
Activator auto-checks for new versions so to test a new unreleased version you will need to start Activator with the
-Dactivator.checkForUpdates=false flag. If you don't set this Activator will use the latest released version instead of the newly created one.
Publishing the Distribution
- make sure you have the desired version of the template catalog configured in
project/LocalTemplateRepo.scala, setting is
latestTemplateCacheHashtask to get latest. Can get the hash for any existing Activator fat distribution by downloading it and digging it out of the included
- if you're trying to ship with an old template catalog, you will need to
set LocalTemplateRepo.enableCheckTemplateCacheHash := falsetemporarily before you type
- commit the desired template catalog hash to git so your build will be reproducible.
- if you want to make a "real" release (not a git-hash-versioned snapshot), create a git tag for it like
- relaunch sbt; type
show versionand it should have picked up the tag.
- if you want to make a snapshot/test release, just let sbt use the git commit as the version.
show versionto verify.
- be sure
- push the version tag to github
- Bump the Heroku configuration for the activator servers so the latest release shows up on typesafe.com and assocaited sites.
We do both
publishSigned you need a GPG key.
publishSigned, upload to S3.
Make sure your credentials are in an appropriate spot. For me, that's in
~/.sbt/user.sbt with the following content:
credentials += Credentials("Amazon S3", "downloads.typesafe.com.s3.amazonaws.com", <AWS KEY>, <AWS PW>)
Then you can run simply:
Publishing NEWS to versions
First, edit the file
news/news.html to display the news you'd like within builder.
sbt> news/publish-news <version>
If you run into staleness issues with a staged release of Activator, just run
reload in SBT to regenerate the version number and then run
stage again. This should give you a new stable version of SNAP for the sbt-launcher so that the new code is used. Should only be needed when doing integration tests.