Posts tagged "maven"

Maven release builds with Jenkins and Git

We have a Jenkins continuous integration server that among other things allows us to run Maven release builds centrally using the M2 release plugin for Jenkins.

This setup worked fine with Subversion, but needed some tweaking after our recent switch to Git and github:enterprise. Here’s what I did to make it work:

  • The release plugin needs write access to the upstream repository, so I had to configure Jenkins to use an ssh key associated with a real account instead of a deploy key that only gives read access.
  • To tie the release commits to the Jenkins server, I configured the global “” and “” settings of the Jenkins account to “Jenkins” and “jenkins@…”.
  • Finally, I hit an “”ref HEAD is not a symbolic ref” error caused by Jenkins by default using a detached HEAD. A quick web search uncovered a solution as described by Stephen Connolly in a related CloudBees user forum thread. The solution was to set the “Checkout/merge to local branch (optional)” option under advanced Git settings on the Jenkins build configuration screen.

With that setup in place, we can again cut new releases with just a single click of the “Schedule Maven Release Build” button. Nice!

Taking control of com.adobe on Maven Central

The com.adobe space on Maven Central has so far been used by various third parties (including myself from before joining Adobe) to make Adobe releases available to Maven clients.

We want to have better control over that space and to make it easier for Adobe projects to publish their releases on Maven Central, which is why I’ve requested a repository that we can use for this. We still need to figure out the internal processes by which new releases can be posted there, but at least the technical bits are already being taken care of.