antでパスワード入力させて処理する 2011/06/25

antです。
inputというのが使えます。

<target name="jetty_restart">
<input message="Please enter password" addproperty="scp.pass"/>
<sshexec host="${scp.server}" keyfile="${ssh.key.file}"
username="${scp.user}" password="${scp.pass}"
command="echo '${scp.pass}' | sudo /etc/init.d/jetty stop"
trust="yes"/>
<sshexec host="${scp.server}" keyfile="${ssh.key.file}"
username="${scp.user}" password="${scp.pass}"
command="echo '${scp.pass}' | sudo /etc/init.d/jetty start"
trust="yes"/>
</target>

: