The example given at https://github.com/philcali/sbt-aws-plugin is as follows:
awsSsh.scripts += NamedSshScript("deploy", execute = {
sshClient =>
val jar = "~/" + (jarName in assembly).value
val assemblyJar = (outputPath in assembly).value.getAbsolutePath
sshClient.upload(assemblyJar, jar).right.map {
_.exec("java -jar " + jar)
}
})
When I try this, I get the error:
/Users/joky/GoCatch/go/build.sbt:20: error: A setting cannot depend on a task
val jar = "~/" + (jarName in assembly).value
In sbt-assembly
, jarName
is defined as a task. I checked the git logs for sbt-assembly
and found that at one stage (about a year ago) it was changed from a setting to a task.
How can I consume the name of the jar produced by sbt-assembly from a script described in sbt-aws-plugin?
Thanks!