Skip to content

POM not created for custom MavenPublication #97

@nucatus

Description

@nucatus

When a custom MavenPublication is built, the artifactory plugin fails to build the POM file.

$ gradle clean :api:artifactoryPublish                                  
:api:artifactoryPublish FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':api:artifactoryPublish'.
\> File '/sbox/gradle-arty/spcx.root/api/build/publications/clientLib/pom-default.xml' does not exist, and need to be published from publication clientLib

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Here is a snippet of the configuration:

[...]

publishing {
    publications {
        mavenJava(MavenPublication) {
            from components.java
        }
        clientLib(MavenPublication) {
            artifact clientJar
            pom.withXml {
                asNode().appendNode('description', 'A demonstration of Maven POM customization')
            }
        }
    }
}

artifactoryPublish {
    publications(publishing.publications.clientLib)
}

if I do publications(publishing.publications.mavenJava), the build is successfull.

I have created a project to demonstrate the issue here: https://github.com/nucatus/sourcesets-arty.git

Gradle: 3.0
Artifactory Plugin: 4.4.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions