Skip to content

NPE trying to publish modules that don’t need to be published #336

Description

@asarkar

Consider a multimodule project where only some of the submodules need to be published. Even the plugin is configured in the root project build file only for the required sub projects, when task bintrayPublish is executed on the root, it fails with NPE.

> Task :bintrayUpload

Repository name, package name or version name are null for project: root project 'xxx'

> Task :bintrayPublish FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':bintrayPublish'.
> java.lang.NullPointerException (no error message)

https://github.com/asarkar/okgrpc/runs/1442767869?check_suite_focus=true

To fix this, task bintrayUpload has to be disabled on the projects that don’t need to be published or each module that needs published is to be published separately. Either way, it’s unnecessary busy work.

Why can’t the plugin just emit a warning and do nothing if the artifact is null?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions