Our nighthly build loops on different branches, each one requiring to be built with a specific java version. To do so, it slurps in a property file where each branch specifies the java version it requires, and then proceeds to call ant again through the <exec> task, resetting the JAVA_HOME environment variable using the <env key=..> nested element. Note, this is not (only) about getting a different compiler version, it is about using a specific release of the java environment (so it is more about path and classpath setting than anything else).
This works well because the nightly build executes always the same target, using the same arguments. I would like to extend the use of this technique to our developers. Right now, when they change branch, they must remember to change their JAVA_HOME env. variable first (and the path). Using the wrapper script above would be nice; however they execute different targets and sometime define properties on the command line. I have not been able to find whether Ant sets a property which contains the command line parameters, which I could then use in the nested <exec>'s element <arg line=>. The only way I could cook up, was to modify the ant, and ant.bat scripts to do just that: define a "ant.ANT_ARGS" and a "ant.cmd.args" property (naming is not important here) on the ant_exec_command and JAVACMD line. Is this ok? Is there a better way to get the same result? Thanks. Patrick --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]