3
votes

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!

1

1 Answers

0
votes

See https://github.com/philcali/sbt-aws-plugin/issues/1. @philcali wrote:

I need to update the README, or change the scripts to a task (which it really should be). Basically, you'd have to use the awsEc2.running as a workaround, or define an awsEc2 action that does the same.