开发者

ant task to log in to a remote unix server and replace a token in directory of files

Hi I want to write an ant script that connects to remote linux/unix host and replace occurrences of a token in all files in a directory and subdirectories.

the script will get host name and login credentials and a directory and a token to replace and will operate.

I have been able to do it locally with replace task and i know there is sshexec task as well. is there a way to combine them together ?

what's a good way of开发者_如何学JAVA doing it ?

thanks !


To execute Ant on a remote host, Ant will need to be on that box and your buildfile will need to be there too. You should then be able to sshexec it remotely.

Depending on your environment (e.g. is this a build environment?), you might consider using the AntServer and RemoteAnt tasks in ant-contrib server tasks as an alternative.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜