<!--替换文件-->
<replace file="${dest.dir}/bme/WEB-INF/classes/jdbc.properties">
<replacefilter token="@username@" value="${database.username}" />
<replacefilter token="@password@" value="${database.encryptpassword}" />
</replace>
<!--telnet和ftp-->
<target name="deployServer">
<telnet server="${deploy.server}" userid="${deploy.user}" password="${deploy.password}" timeout="10">
<!--命令提示符如:linux (linux ls)-->(包括空格)
<read string="${deploy.prompt}" />
<write>cd ~</write>
<read string="${deploy.prompt}" />
<write>cd tomcat</write>
<read string="${deploy.prompt}" />
</telnet>
<ftp server="${deploy.server}" userid="${deploy.user}" password="${deploy.password}" remotedir="tomcat/webapps" action="put">
<fileset file="${deploy.dir}/aa.war" />
</ftp>
</target>