Skip to content
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

Multimodule: docker:publish error in virtual root #800

Closed
alaz opened this issue May 31, 2016 · 2 comments
Closed

Multimodule: docker:publish error in virtual root #800

alaz opened this issue May 31, 2016 · 2 comments
Labels

Comments

@alaz
Copy link

alaz commented May 31, 2016

I have a multimodule project in SBT where root project is a virtual project to aggregate both subprojects. It looks similar to this code:

lazy val root = (project in file("."))
  .aggregate(web, backend)
  .settings(
    publishArtifact := false
  )

lazy val web = project
  .enablePlugins(PlayScala, BuildInfoPlugin, DockerPlugin)

lazy val backend = project
  .enablePlugins(BuildInfoPlugin, JavaServerAppPackaging, DockerPlugin)

The subprojects generate own Docker containers and this works perfectly. When I call docker:publishLocal, the whole build succeeds. But I experience the problem when calling docker:publish. Both subprojects get pushed, but I still get the error from "root" project:

[trace] Stack trace suppressed: run last root/*:publishConfiguration for the full output.
[error] (root/*:publishConfiguration) Repository for publishing is not specified.

Is there a way to get rid of this false error?

@muuki88 muuki88 added the docker label May 31, 2016
@muuki88
Copy link
Contributor

muuki88 commented May 31, 2016

Thanks for your detailed description. You need to disable the publish in Docker task for your root project.

lazy val root = (project in file("."))
  .aggregate(web, backend)
  .settings(
    publish in Docker := {}, // something like this
    publishArtifact := false
  )

This way root/docker:publish won't be executed.

@muuki88 muuki88 closed this as completed May 31, 2016
@alaz
Copy link
Author

alaz commented Jun 1, 2016

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants