I'm tyring to figure out how to change the batch task plugin to pass the job configuration on to the script to properly set up the path for Maven/Ant batch-tasks. I prefer this approach over having to set/modify the hudson users path explicitly since I'm using mixed versions of Maven/JDK for different projects and I think doing so makes it impossible to use the 'correct' version.
In particular I intend to use this to run 'mvn release:prepare release:perform' on my fee-style Maven jobs. This would require binaries for the JDK, Maven, and my scm provider (Mercurial in this case) to be on the path. I noticed that the JDK path is added by a call to buildEnvVars but this isn't consistent with all objects that have the buildEnvVars method (e.g. the SCM providers don't tend to add to the path). I'm wondering if it may be better to have an explicit method for getting the path to the binaries directory and adding that to the path. Of course for backwards compatibility any existing getEnvVars that already did this should continue to do so.
Another option may be to create a plugin specific to this activity (running Maven release goals) but I think my general approach would be the same.
If you have any thoughts or pointers on how to proceed, I'd appreciate it.
CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain confidential and proprietary information of Alcatel-Lucent and/or its affiliated entities. Access by the intended recipient only is authorized. Any liability arising from any party acting, or refraining from acting, on any information contained in this e-mail is hereby excluded. If you are not the intended recipient, please notify the sender immediately, destroy the original transmission and its attachments and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Copyright in this e-mail and any attachments belongs to Alcatel-Lucent and/or its affiliated entities.