Search code examples
scalasbttypesafe-activatorsbt-native-packager

sbt error after adding sbt-native-packager


I created a simple project using typesafe activator:

activator new helloapp hello-play-scala

If I run sbt command inside the helloapp directory it works

Now I edit project/plugins.sbt and add the following line:

addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.3")

If I run sbt command inside the hellopapp directory I get the following error:

[info] Loading project definition from /home/blr/kubeplayground/gultenetwork/project
[error] java.lang.NoClassDefFoundError: sbt/AutoPlugin
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

I am not able to understand why this is happening.


Solution

  • This version of sbt-native-packager is an AutoPlugin and they were only added in SBT 0.13.5. The current SBT version is 0.13.11, update to it.