首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件开发 >

Ant-sshexec-实施远程服务器或本地脚本

2012-06-29 
Ant-sshexec-执行远程服务器或本地脚本1. 远程服务器???Reference:http://ant.apache.org/manual/Tasks/ss

Ant-sshexec-执行远程服务器或本地脚本

1. 远程服务器

?

?

?

Reference:http://ant.apache.org/manual/Tasks/sshexec.html

?

Runs a command on a remote machine running SSH daemon.

Note:<sshexec host="${host}" username="${usr}" password="${pwd}" trust="true" command="pwd;./test.sh" outputproperty="output"/>

?

?

?

这样在后续的ant脚本中就可以用${output}来取得脚本的运行结果了。

?

<exec dir="${tools.dir}" executable="xx.sh或xx.bat或xx.exe" outputproperty="platform.type" />

?

?

<exec dir="${tools.dir}" executable="uname" outputproperty="platform"> <arg value="-s"></arg></exec>

热点排行