CLI
coursier relies on sbt-pack to build its CLI from sources. sbt-pack conveniently allows to build a launcher for the CLI, either once, or continuously, while watching sources.
Note that this only applies during development, the
final coursier
launcher generated upon each release relies on the
coursier bootstrap
command, itself pulling a proguarded assembly of the
cli module of coursier.
Batch mode
From freshly cloned sources, run
$ sbt cli/pack
to build a CLI launcher from sources.
This builds a
modules/cli/target/pack
directory via
sbt-pack.
This directory contains a coursier launcher, that can be used like
$ modules/cli/target/pack/bin/coursier launch io.get-coursier:echo:1.0.1 -- foo
Continuous mode
In a terminal window, run
sbt "~cli/pack"
This builds a modules/cli/target/pack
directory like above, then
watches the sources of coursier for changes, and re-builds that directory
upon changes.
You can then run the coursier CLI from another terminal, like
$ modules/cli/target/pack/bin/coursier launch io.get-coursier:echo:1.0.1 -- foo