Invoking m2release plugin on Hudson with cURL

A short information on how to execute a M2 Release Plugin on Hudson CI using cURL

Let us assume that your Hudson is visible at HUDSON_URL.

[IMPORTANT this stopped working around Hudson 1.363 when the maven release screen was redesigned]

Execution of normal build

Executing a normal build is easy. All you have to do is to execute a command like:

curl HUDSON_URL/job/NAME_OF_YOUR_JOB/build?delay=0sec

for example


Execution of release build

Now you want to "Perform a Maven Release". Because this command is triggered as a POST form submission you need to use "-d" switch and pass few parameters.
I haven't checked if you can omit some of them. I guess it should be possible and default values would be used instead.

curl -d "-Dproject.rel.GROUP_ID%3ANAME_OF_YOUR_JOB=RELEASE_VERSION&" HUDSON_URLjob/NAME_OF_YOUR_JOB/m2release/submit

for example

curl -d ""

BTW. Many thanks to developers of Live HTTP Headers Firefox extension ! It helped me a lot to learn what parameters should be passed in POST request.

This used to be my blog. I moved to long time ago.


Please comment using