These are chat archives for sbt/sbt-native-packager

Jul 2017
Guillermo Lammers Corral
Jul 26 2017 12:30


I have a project with version "0.0.1-SNAPSHOT", when I execute sbt docker:publish I just want to publish the latest tag instead of both latest and 0.0.1-SNAPSHOT, but in case I have a version without SNAPSHOT I want to publish both of them. I accomplished that using the following configuration:

dockerUpdateLatest := true,
version in Docker := version { v =>
      if (v.contains("SNAPSHOT")) "latest" else v

The problem here is when the version is a SNAPSHOT the latest tag is published twice due to the dockerUpdateLatest := true. To fix this I could change the configuration:

dockerUpdateLatest := version { v =>
      if (v.contains("SNAPSHOT")) false else true
    version in Docker := version { v =>
      if (v.contains("SNAPSHOT")) "latest" else v

But I think is not the best way to do that, it seems spaghetti code in a configuration file... Any ideas?

sbt native-packager 1.2.0

Jul 26 2017 13:41
Hi guys, I am having difficulty in setup java.lib.path. I do not see any option to allow me to specify this java parameter at runtime.
Jul 26 2017 13:50
In this path src/universal/<APP_ENV_NAME>_config.txt, what is <APP_ENV_NAME>?
Nepomuk Seiler
Jul 26 2017 21:33
@glammers1 the code looks ok. Put these kind of logic into a custom AutoPlugin where it belongs and you have a clearer build.sbt and a maintainable plugin.
@nlhkh IIRC the APP_ENV_NAME is set by the normalizedNamesetting key.
@Fruzenshtein sorry for the very late reply. You enabled the JavaAppPackaging which configures your build to generate a runnable distribution in many formats.