I have a project that uses the maven-publish plugin.
“gradle tasks” correctly shows several publications:
Publishing tasks ---------------- generatePomFileForJavadocPublication - Generates the Maven POM file for publication ‘javadoc’. generatePomFileForMainPublication - Generates the Maven POM file for publication ‘main’. generatePomFileForSchemaPublication - Generates the Maven POM file for publication ‘schema’. publish - Publishes all publications produced by this project. publishJavadocPublicationToMavenLocal - Publishes Maven publication ‘javadoc’ to the local Maven repository. publishJavadocPublicationToMavenRepository - Publishes Maven publication ‘javadoc’ to Maven repository ‘maven’. publishMainPublicationToMavenLocal - Publishes Maven publication ‘main’ to the local Maven repository. publishMainPublicationToMavenRepository - Publishes Maven publication ‘main’ to Maven repository ‘maven’. publishSchemaPublicationToMavenLocal - Publishes Maven publication ‘schema’ to the local Maven repository. publishSchemaPublicationToMavenRepository - Publishes Maven publication ‘schema’ to Maven repository ‘maven’. publishToMavenLocal - Publishes all Maven publications produced by this project to the local Maven cache.
When I run "publishToMavenLocal " I get my main jar, a jar with ‘javadoc’ classifier, and a zip with ‘schema’ classifer in my maven cache.
When I run “publish”, only the zip with the ‘schema’ classifier is left in the “remote” maven repo! I.e. just the “last” publication". The maven repo in question is our corporate Artifactory server.
I see “Uploading: …” printed for all relevant files (pom, and three archives), but only the pom and the final upload are present when I browse the Artifactory repo. I don’t have this problem when publishing to the same repo using Maven.
Ideas?