-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaAppPackaging enables Docker packaging #1337
Comments
My bad, this is actually intended behaviour... I guess I'll have to manually disable docker publishing for individual modules. |
Thanks for the well done issue 😊 Yes, the behaviour is intended. Users should configure as less as possible. Josh called this "batteries included" |
Well, I still have kind of and issue: |
This isn't implemented in native-packager AFAIK. To override the publishing for a specific format you need to do something like Docker / publishLocal := { },
Docker / publish := {} |
Thank you, that worked. |
Expected behaviour
According to documentation:
https://www.scala-sbt.org/sbt-native-packager/formats/docker.html#required-settings
I expect that enabling docker plugin explicitly is required for enabling docker-related tasks.
Actual behaviour
enablePlugins(JavaAppPackaging)
is enough to makedocker:publish
Information
sbt-native-packager 1.7.1
sbt version 1.3.4
empty project (no source code except build files) with single module
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.1")
lazy val test = (project in file(".")).enablePlugins(JavaAppPackaging)
So whats the issue: I have a large multi-module project, with several java executable modules. Some of those are published as docker images; but not all of them. I also rely heavily on build aggregation, so that I would only trigger publish on the root and have all the stuff where it should be. Enabled-by-default publishing behaviour means that modules that were not properly configured for publishing could end up published... somehow, somewhere.
I was using sbt native packager + sbt docker, and now I'm rewriting my builds to use only native packager; and this behaviour caught me by surprise.
The text was updated successfully, but these errors were encountered: