Part 1
Are you using sbt 0.12 or 0.13?
In sbt 0.12 and earlier versions, keys are capitalized-like-this
in sbt's interactive mode, but are capitalizedLikeThis
in build definitions.
In sbt 0.13 capitalizedLikeThis
is accepted in both contexts. (capitalized-like-this
is still accepted in interactive mode, but only for backwards compatibility.)
Anyway, regardless of whether you're using 0.12 or 0.13, you need to change package-zip-tarball
to packageZipTarball
. The Scala parser thinks the former means package - zip - tarball
. And package
is a keyword, which is where the errors you're getting are coming from.
If you're on 0.13, you can forget the whole hyphens thing entirely as a now-irrelevant historical quirk.
Part 2
I've found that in order for packageZipTarball in Universal
to compile, you must add import com.typesafe.sbt.packager.Keys._
to the top of build.sbt.
The sbt-native-packager readme does have a couple uses of import
and of explicitly qualified names that begin with com.typesafe.sbt.packager
, so there was at least a little indication that something like this might be necessary, but maybe the doc ought to call it out more explicitly.