2
我的phing構建文件中存在格式錯誤的XML問題。我想要一個任務,它將gunzip一個文件,然後管到mysql來恢復數據庫備份。我發現在命令中使用「<」符號會導致錯誤。執行時使用「小於」字符的Phing語法錯誤
這是我認爲是打破了構建腳本當前行:
<exec command="gunzip < ${mysql.backup} | mysql -u ${mysql.username} -p ${mysql.password} ${mysql.database}"
logoutput="true" checkreturn="true" />
輸出:
BUILD FAILED
exception 'BuildException' with message 'Error reading project file [wrapped: /home/ec2-user/project/build.xml:206:30: > required]' in /usr/share/pear/phing/parser/ProjectConfigurator.php:197
有什麼方法逃避command=""
一部分?
或者更好的方法來做到這一點?
謝謝,我不確定這是怎麼做到在phing/xml,但它的工作! – Matt 2012-01-16 23:49:20