I have a Java project, building with Gradle, using the Jenkins CI server, and I would like to publish to an Artifactory server, using Maven-compatible artifacts. The project is using Git. I would also like to use the release management features of Jenkins if possible.
This is very confusing. There are at least five plugins, with much overlapping redundant functionality. Some plugins seem to replace others. Some plugins seem to require others.
FYI, the five relevant plugins seem to be:
1) Jenkins Artifactory Plugin https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin
2) Gradle "maven" Plugin http://www.gradle.org/docs/current/userguide/maven_plugin.html
3) Gradle "maven-publish" Plugin http://www.gradle.org/docs/current/userguide/publishing_maven.html
4) Gradle "artifactory" Plugin https://www.jfrog.com/confluence/display/RTF/Gradle+Artifactory+Plugin
5) Gradle "artifactory-publish" Plugin http://www.jfrog.com/confluence/display/RTF/Gradle+1.6+Publishing+Artifactory+Plugin
What is the best way to set this up?
If I use the Jenkins Artifactory Plugin with none of the other plugins mentioned, I get an error:
No publish configurations specified for project ':' and the default 'archives' configuration does not exist.
Cannot publish pom for project ':my-great-app' since it does not contain the Maven plugin install task and task ':my-great-app:artifactoryPublish' does not specify a custom pom path.
I assume I need to use either maven
or maven-publish
in build.gradle?
maven-publish
is labeled as the incubating successor to the maven
plugin. How much better is it? How stable is it?
How does using one of the Gradle Artifactory plugins compare to the standard maven publishing plugins vs using the Jenkins plugin?
artifactory
plugin works with maven
plugin and publishes configurations
, generated by maven
plugin.artifactory-publish
plugin works with maven-publish
plugin and publishes publications
generated by maven-publish
plugin.artifactory
or artifactory-publish
plugins in Gradle build script.artifactory
plugin to the Gradle script if it is not there.So, here's what you need to decide:
maven
or maven-publish
. While the later is still 'incubating', it is much more flexible than the former. Once you know with which maven plugin you want to use, select the appropriate artifactory plugin.