Last night, I bumped into a bug of groovy.bat while testing Gj script (that I wrote to make executable jar files easily. See my previous post for the details). groovy.bat cannot handle any command-line arguments that contain * (asterisk).
For example, when entering the following commands, groovy.bat will not respond.
groovy Foo.groovy "*"
groovy -e "println '*'"
When passing the arguments directly to GroovyMain, it works.
java -cp "%GROOVY_HOME%\embeddable\groovy-all-1.8.0.jar" groovy.ui.GroovyMain -e "println '*'"
I searched to see if this is a known bug, and I found GROOVY-3043. Fortunately the bug is already fixed 2 years ago. OK, so I... fixed? Wait, it's still here.
Strangely the fixed (not sure, but it seems to work) version of startGroovy.bat (that is called by groovy.bat and parses command-line arguments) is attached to GROOVY-3043. I have no idea why it is not provided us yet...
I reported this bug as new issue, GROOVY-4805. And also I attached a patch which I wrote to the issue, so you might try the patch if you are Windows NT-based user. Anyway, I hope this bug is fixed ASAP.