<?xml version="1.0" encoding="UTF-8"?>
<project name="ssh_ant" default="update" basedir=".">
<property name="local_dir" value="."/>
<property name="tomcat_dir" value="D:/apache-tomcat-6.0.18"/>
<property name="cm_menu" value="${tomcat_dir}/webapps/ROOT/manager/menu"/>
<property name="class.dir" value="${basedir}/bin"/>
<property name="address" value="134.98.83.114"/>
<property name="user" value="cm"/>
<property name="password" value="123456"/>
<target name="update" description="ssh update">
<echo message="update start..."/>
<scp todir="${user}:${password}@${address}:${ut}" trust="true">
<fileset dir="${uf}"/>
</scp>
<echo message="update end...."/>
</target>
<target name="updateone">
<echo message="updateone start..."/>
<scp todir="${user}:${password}@${address}:${ut}" trust="true" file="${uf}"/>
<echo message="updateone end..."/>
</target>
<target name="download" >
<echo message="download start!!!!!!!!!!"/>
<scp file="${user}:${password}@${address}:${df}*.*" todir="${dt}" trust="yes" />
<echo message="download end!!!!!!!!!!"/>
</target>
<target name="downloadone">
<echo message="downloadone start!!!!!!!!!!"/>
<scp file="${user}:${password}@${address}:${df}" todir="${dt}" trust="yes" />
<echo message="downloadone end!!!!!!!!!!"/>
</target>
</project>
ssh文件上传下载--ant实现
最新推荐文章于 2024-09-25 15:12:19 发布