|
|
|
This was naked Windows.
The syntax Another caution is that a trailing backslash such as I have moved this from being a bug in Gant to being a bug in Groovy. The problem resides in the Windows/DOS batch scripts. The Gant scripts is essentially identical to the Groovy and Groovyc scripts, so the problem is in the relationship between the initiating script, startGroovy.bat and actually executing the Java command.
I am assuming the only reason it comes up with Gant now is that Groovy and Groovyc don't take -D options. It had been marked fixed in Gant since there was a work around, but it wasn't fixed.
I have applied a patch which improves this area. While not perfect should be good enough to close off this issue. The following testcases (among others) were used:
groovy.bat -D test=3.5 -e "assert 4.0 * System.getProperty('test').toDouble() == 14.0" groovy.bat -Dprop=abc -e "assert System.getProperty('prop') * 2 == 'abcabc'" |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Someone had a very similar problem some months ago with the DOS batch script. After a lot of experimentation, in the end, they discovered that the only thing that worked was:
gant "-D barney=123"
This is a DOS batch file issue not a Gant source code issue. An alternative to the above is to use the native launcher instead of the DOS batch file.