2
我已經編寫了我自己的gant腳本,它可以在命令行中正常工作。現在,我需要從這樣的Grails項目運行此腳本:從grails項目執行gant腳本
def outputMessage
try{
GroovyScriptEngine engine = new GroovyScriptEngine("/www", this.getClass().getClassLoader());
engine.run("scripts/MyOwnScript_.groovy", "param1 param2")
outputMessage = "<br> OK: Script run successfully"
}
catch (Exception e) {
outputMessage += "<br> ERROR: There has been running the script"
}
我得到的錯誤是「沒有這樣的屬性:includeTargets類:MyOwnScript_」,作爲我的GANT腳本需要一些其他的腳本。
有沒有人知道讓它正常工作的正確方法?