I think you are right mindless. I ran some tests on both my Windows 2003 Builder as well as my Ubuntu Hudson master. Ubuntu handles the property variables well, but Windows does not. Here are some sample runs with a simple string parameter in hudson:
==WINDOWS 2003==
#With no param variables
Started by user anonymous
Building remotely on hudson_slave_builder
[pranava] $ cmd.exe /C '"ant.bat -file build.xml test && exit %%ERRORLEVEL%%"'
Buildfile: build.xml
test:
[echo] hello world
BUILD SUCCESSFUL
Total time: 0 seconds
Finished: SUCCESS
#With a param variable testvar=hello
Started by user anonymous
Building remotely on hudson_slave_builder
[pranava] $ cmd.exe /C '"ant.bat -file build.xml -Dtestvar=hello test && exit %%ERRORLEVEL%%"'
Buildfile: build.xml
test:
[echo] hello world
BUILD SUCCESSFUL
Total time: 0 seconds
Finished: SUCCESS
#With a param variable testvar=<hello
Started by user anonymous
Building remotely on hudson_slave_builder
[pranava] $ cmd.exe /C '"ant.bat -file build.xml -Dtestvar=<hello test && exit %%ERRORLEVEL%%"'
The system cannot find the file specified.
Finished: FAILURE
#In the case of "hello>" the target is lost, and the output is piped to a file called test instead of launching the target test.
Started by user anonymous
Building remotely on hudson_slave_builder
[pranava] $ cmd.exe /C '"ant.bat -file build.xml -Dtestvar=hello> test && exit %%ERRORLEVEL%%"'
Finished: SUCCESS
==UBUNTU LUCID==
Started by user anonymous
Building on master
[pranava] $ ant -file build.xml -Dtestvar=<hello test
Buildfile: /home/tester/build.xml
test:
[echo] hello world
[echo] <hello
BUILD SUCCESSFUL
Total time: 0 seconds
Finished: SUCCESS
Started by user anonymous
Building on master
[pranava] $ ant -file build.xml -Dtestvar=hello> test
Buildfile: /home/tester/build.xml
test:
[echo] hello world
[echo] hello>
BUILD SUCCESSFUL
Total time: 0 seconds
Finished: SUCCESS
Looks like the bug is in Hudson core, when running ant on windows. I tried this on Solaris, and it seems to work fine:
Can you do a test on your master node or other non-windows and see if that works for you? Can you also run a test on your windows slave where you use a simple String parameter instead of a build selector.. run a build and just put a value that has a < character and see if that also gets an error.
If you can confirm these, I'll dig deeper into how Hudson runs ant on windows..