Runs artifact-cli inside sbt, manages all-in-one jar/zip artifacts in S3.
1. Install artifact-cli
pip install artifact-cli
pip. (may need
2. Add to your plugins.sbt the line
addSbtPlugin("jp.ne.opt" % "sbt-art" % "0.1.3")
3. Write AWS configuration
- ~/.artifact-cli.conf (prior) or project/artifact-cli.conf
Load ~/.artifact-cli.conf if it exists, otherwise load project/artifact-cli.conf.
[default] aws_access_key_id = XXXXXXXXXXXXXXXXXXXX aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX bucket = your-bucket-name region = your-region (e.g. ap-northeast-1, us-east-1)
4. Add settings to your project
First, import keys in your
Group ID for artifact-cli. Default is same as your
artGroupId in art := "your-group-id"
Target file for uploading and showing information.
If your project is using
sbt assembly or
play dist to publish, you can write the nifty way as follows.
- For sbt-assembly project
import sbtassembly.AssemblyKeys._ artTarget in art := (assembly in assembly).value
artTarget in art := (assemblyOutputPath in assembly).valuealso works. (without running
- For play project with universal (zip-file) distribution
import com.typesafe.sbt.SbtNativePackager.Universal artTarget in art := (packageBin in Universal).value
4.3 artConfig (optional)
Path to the configuration file for artifact-cli is also customizable. Default is
artConfig in art := new File("path/to/your.conf")
Use environment variable to specify configuration file.
artConfig in art := sys.env.get("VARNAME").map(new File(_)).getOrElse((artConfig in art).value)
You can run the following tasks in the sbt project.
||Prints the version number of artifact-cli.|
||Lists all the artifacts in the group.|
||Shows the information of the specified artifact.||If
||Uploads the current artifact.||