चलाने के लिए मैं आम तौर पर निर्माण अपने प्रोजेक्ट कमांड लाइन से इन दो आदेश (डॉस) का उपयोग करकैसे() पर अमल ग्रूवी में उपयोग करने के लिए किसी भी कमांड
G:\> cd c:
C:\> cd c:\my\directory\where\ant\exists
C:\my\directory\where\ant\exists> ant -Mysystem
...
.....
build successful
क्या मैं बजाय ग्रूवी से ऊपर क्या करना चाहते हैं? ग्रूवी execute()
विधि है, लेकिन निम्नलिखित मेरे लिए काम नहीं करता है:
def cd_command = "cd c:"
def proc = cd_command.execute()
proc.waitFor()
यह त्रुटि देता है:
Caught: java.io.IOException: Cannot run program "cd": CreateProcess error=2, The
system cannot find the file specified
at ant_groovy.run(ant_groovy.groovy:2)