Skip to content

Publish with SBT 1.9.0 always requires publishTo defined even with skip/publish set to true #7288

@KarelCemus

Description

@KarelCemus

steps

  • this bug first appeared with SBT 1.9.0, worked fine in older versions
  • to reproduce the bug run publish on the following project
val root = (project in file(".")).aggregate(api,service)
lazy val api = project.settings(publishTo := Some(Resolver.mavenLocal))
lazy val service = project.settings(skip/publish := true)

problem

I am getting

[error] stack trace is suppressed; run last service / publishConfiguration for the full output
[error] stack trace is suppressed; run last publishConfiguration for the full output
[error] (service / publishConfiguration) Repository for publishing is not specified.
[error] (publishConfiguration) Repository for publishing is not specified.
[error] Total time: 0 s, completed Jun 5, 2023, 11:01:56 PM

SBT forces me to set publishTo to Some even for modules which are never supposed to be published

expectation

publishTo set to None (which is a default value) should be fine in modules with skip/publish := true

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions