I have a number of projects running on a Hudson slave. I'd like one of them to run Ant under Java6, rather than the default (which is Java5 in my environment).
In the project configuration view, I was hoping to find either:
Is there a way to do either of the above? If one of those facilities is available, I can't see how to access it. I'm running on Hudson 1.285.
I would rather avoid using an "execute shell" operation instead of the "invoke Ant" operation if possible: my slave is on z/OS and Hudson doesn't seem to create the temporary shell scripts properly on this platform (probably an encoding issue).
We have both Java 5 and Java 6 configured for use in our Hudson instance.
Under Manage Hudson -> Configuration System you can add a number of JDKs and specify the path for JAVA_HOME. In the configuration for each job you then selected which JDK you would like that job to run on.