Ant的SCP問題
下面是一段ANT,目的是針對一堆server做程式的佈署工作 一般我們習慣用build.properties作為參數設定檔 而也可以動態的用 -D KEY = VALUE 作為臨時的參數輸入... 而實際上的執行檔案是build.xml... #build.properties SERVER_LIST=11.11.11.11,11.11.11.12,11.11.11.13 USER=xxxx PASSWD=oooo TMP_FOLDER=/tmp #build.xml <target name="Deploy"> <antcall target="Wrapper code" /> <!-- 檢查是否有手動輸入-DSERVER=xx.xxx.xxx.xxx --> <condition property="SERVER.set" else="false"> <isset property="SERVER"/> </condition> <echo>Is specify server? ${SERVER.set}</echo> <!-- 如指定-DSERVER=xx.xxx.xxx.xxx時候,忽略設定檔案,直接進行deploy --> <ac:if> <equals arg1="${SERVER.set}" arg2="true"/> <then> <ac:var name="SERVER_LIST" value="${SERVER}...