Monday, August 20, 2018

GradlePublishPlugin: How to add classifier for raw publishing file?

I am publishing binary file to Apache Archiva repository. I can add classifier via web-interface, but when it comes to gradle maven publishing plugin usage, I can only add classifiers for jar artifacts.

I am trying to publish an executable, so I pass it as file

publishing {
publications {
    exe(MavenPublication) {
        groupId "${groupId}"
        artifactId "${artifactId}"
        version "${version}"

        artifact file("build/binaries/mainExecutable/release/main.exe")

        pom.setPackaging("exe")
    }
}

Everything works well, except classifier.

No comments:

Post a Comment