Reply to comment
Invoking m2release plugin on Hudson with cURL
Submitted by Tomek Kaczanowski on Thu, 05/06/2010 - 18:31A 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=0secfor example
curl http://hudson.mycompany.pl/job/my-job/build?delay=0secExecution 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&-Dproject.dev.GROUP_ID%3ANAME_OF_YOUR_JOB=NEXT_DEV_VERSION&json=%7B%7D&Submit=Schedule+Maven+Release+Build" HUDSON_URLjob/NAME_OF_YOUR_JOB/m2release/submitfor example
curl -d "-Dproject.rel.pl.mygroup%3Amy-job=1.2&-Dproject.dev.pl.mygroup%3Amy-job=1.2-SNAPSHOT&json=%7B%7D&Submit=Schedule+Maven+Release+Build" http://hudson.mycompany.pl/job/my-job/m2release/submitBTW. 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.

Recent comments
4 days 3 hours ago
4 days 6 hours ago
1 week 3 days ago
2 weeks 5 days ago
3 weeks 5 days ago
3 weeks 5 days ago
4 weeks 1 day ago
4 weeks 2 days ago
4 weeks 2 days ago
6 weeks 4 days ago