Plugins name not found in build.sbt

Hi,
I’d like to use sbt this plugin for sbt https://github.com/scalameta/sbt-native-image .

I created project/plugins.sbt and put addSbtPlugin(“org.scalameta” % “sbt-native-image” % “0.3.1”) in this file.

But I have error in

  • .enablePlugins(NativeImagePlugin)
    as NativeImagePlugin is not found.
    Could you explain how to install and use those plugins in Scala project (sbt) ?

Idem for https://www.scala-sbt.org/sbt-native-packager/formats/graalvm-native-image.html: where is GraalVMNativeImagePlugin defined ?

Thank you,
Best regards

Could you prepare a minimal reproducible example project on Github perhaps?

Usually this works as you did it, but there must be something amiss or wrong.

1 Like

Hi,
And finally I used GraalVM to get native images and work fine:
My steps:

  • create a jar with sbt assembly plugin
    I had to add addSbtPlugin(“com.eed3si9n” % “sbt-assembly” % “x.y.z”) and put the right number instead of x y z !
  • native-image [options] -jar jarfile [imagename] [options]
    Best regards