If your bat file looks something like:
..some stuff.. groovy myGroovy copy xyz abc ... more stuff ..Then in 1.7.4 you would have called groovy.exe, executed the program, then continued to copying the file. But in 1.8.x groovy.exe is deprecated so instead you execute groovy.bat. Unfortunately, when a Windows bat script calls another in that way, it effectively jumps to the script (with no return) so the script finishes at the end of groovy.bat. To fix this, use the Windows CALL instruction:
..some stuff.. call groovy myGroovy copy xyz abc ... more stuff ..With the CALL, the groovy.bat script executes and then returns control to your script, and the copy and more stuff actually happens.
NOTE: I think the reason I have the problem is that I installed the generic groovy rather than using the specific windows installer (eg here). But codehaus seems to be down right now.
No comments:
Post a Comment