Skip to content

Maven dependency not published for shadow dependency on project #541

@ejjcase

Description

@ejjcase

Please check the User Guide before submitting "how do I do 'x'?" questions!

Shadow Version

5.2.0

Gradle Version

5.6.4

Expected Behavior

I have a multi-project build with subprojects foo-api and foo-impl. Both are published with maven-publish. foo-impl uses shadow and has this dependency:

shadow(project(":foo-api"))

When I publish foo-impl I expect the .pom to declare a runtime dependency on foo-api with the appropriate group and version.

Actual Behavior

The .pom does not declare any dependencies.

I can work around the problem by declaring the dependency like this instead:

shadow("$group:foo-api:$version")

but this only works if that version of foo-api is already published - an unsafe assumption.

Gradle Build Script(s)

Content of Shadow JAR (jar tf <jar file> - post link to GIST if too long)

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