ant ftp 使用
来源:互联网 发布:iphone桌面软件消失 编辑:程序博客网 时间:2024/05/10 18:56
参考:http://lijunjie.javaeye.com/blog/160977
目的:方便部署文件,不再使用ssh的拷贝和粘贴。
使用:
ant 使用jar 包 jakarta-oro-2.0.1.jar;
http://archive.apache.org/dist/jakarta/oro/
commons-net-1.4.1.jarhttp:
http://apache.mirror.phpchina.com/commons/net/binaries/
加载到 eclipes ant 路径上;Window→ Preferences→ Ant→ Runtime+jar
build -> copy action
本例小结:
时间有限,这里就展现写这些。
代码的部署方便了。
听说 sftp 服务器可以用
需要lib http://www.jcraft.com/jsch/index.html
<scp trust="true" file="./src/Main.java" todir="root:pass@***.***.***.***:/tmp" />
<sshexec .....>远程运行命令!!!
还可以参考 命令 rsync http://www.oreilly.com.cn/samplechap/linuxserverhacks/ch38.pdf
有时间 再尝试
目的:方便部署文件,不再使用ssh的拷贝和粘贴。
使用:
ant 使用jar 包 jakarta-oro-2.0.1.jar;
http://archive.apache.org/dist/jakarta/oro/
commons-net-1.4.1.jarhttp:
http://apache.mirror.phpchina.com/commons/net/binaries/
加载到 eclipes ant 路径上;Window→ Preferences→ Ant→ Runtime+jar
build -> copy action
<?xml version="1.0"?>
<project>
<target name="init">
<ftp server="xxx.xxx.xxx.xxx"
userid="name"
password="pass"
remotedir="/usr/"
action="get"
>
<fileset dir="D:\\ant\\ftp_data">
</fileset>
</ftp>
</target>
</project>
<project>
<target name="init">
<ftp server="xxx.xxx.xxx.xxx"
userid="name"
password="pass"
remotedir="/usr/"
action="get"
>
<fileset dir="D:\\ant\\ftp_data">
</fileset>
</ftp>
</target>
</project>
本例小结:
时间有限,这里就展现写这些。
代码的部署方便了。
听说 sftp 服务器可以用
需要lib http://www.jcraft.com/jsch/index.html
<scp trust="true" file="./src/Main.java" todir="root:pass@***.***.***.***:/tmp" />
<sshexec .....>远程运行命令!!!
还可以参考 命令 rsync http://www.oreilly.com.cn/samplechap/linuxserverhacks/ch38.pdf
有时间 再尝试
- ant ftp 使用
- ant ftp 使用
- Ant脚本 ftp、telnet、ssh 使用
- ANT中的Telnet和FTP
- FTP和Ant整合案例
- ant 的ftp任务使用,实现自动备份等,解决中文问题
- 使用Eclipse中的ant功能将生成的JAR文件ftp到服务器
- ant使用ftp上传数据时配置的一个报错问题
- ANT使用
- 使用ANT
- Ant使用
- Ant使用
- ANT使用
- ant 使用
- ant使用
- Ant 使用
- ant使用
- 使用ANT
- Xmanager连接CentOS6
- 1051. Biker's Trip Odomete简单题
- 使用dbunit向数据库中插入xml数据
- 1176. Two Ends两人从两头取数
- gethibernatetemplate的find方法使用说明
- ant ftp 使用
- 如何在Visual Studio中打开REST SOE模板
- 1198. Substring 8个串排出最小字典序(8!枚举)
- 制定自己 ant 标签
- Message Modem Develop
- 1006.Team Rankings 栈与回溯 简单 5!搜索
- Python源码剖析[17] —— 执行引擎之框架
- JAVA GBK 字符串转为utf-8
- ant ftp 使用