My final goal is to run mvn release:prepare on my local machine to have greater control and trigger the actual mvn release:perform on Hudson, which will do the deployment in a controlled environment and archive the build log.
To achieve this, I want to upload the generated release.properties to the Hudson instance. This should be possible using the Parameterized Trigger Plugin. The tricky part is that the proposed solution on the plugin's Wikipage using buildWithParameters seems not to work, I always got HTTP/400 or HTTP/500 responses. After some tries and an analyze of the traffic with Charles I came up with two solutions, one using token authentication, the other one basic authentication. The important part seems to be to include the parameters json and Submit as well. Note that the file parameter is numbered, i.e. it is called file0.
Token authentication
curl -i -Fname=release.properties -Ffile0=@FILE_TO_UPLOAD \ -Fjson='{"parameter": {"name": "release.properties", "file": "file0"}}' \ -FSubmit=Build \ 'http://HUDSON/hudson/job/JOBNAME/build?token=TOKEN'
The advantage of this is that no further user interaction is required, however you do not know who triggered the build.
Basic HTTP authentication
curl -i -uUSERNAME -Fname=release.properties -Ffile0=@FILE_TO_UPLOAD \ -Fjson='{"parameter": {"name": "release.properties", "file": "file0"}}' \ -FSubmit=Build 'http://HUDSON/hudson/job/JOBNAME/build'
The advantage of this is you know who triggered the build.