使用Apache Ant部署Web应用程序? [英] Using Apache ANT to deploy web applications?

查看:193
本文介绍了使用Apache Ant部署Web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是能得到Apache Ant的我的电脑上运行。在蚂蚁-version 突击队输出的版本号,确认安装进展顺利。

I was just able to get Apache ANT running on my computer. The ant -version commando outputs the version number , verifying that the installation went well.

我已阅读, ANT非常适合处理Web部署应用,包括PHP项目,并已花了一些时间去工作,但我就是不能让我围绕着如何将它设置为我的文件同步到我的Web服务器的头。

I have read that ANT is well suited to handle deployment of web applications including PHP projects and have spent some time to get it working, but I just can't get my head around how to set it up to sync my files to my web server.

我怎样才能让ANT同步 folderA FolderB中

How can I make ANT sync folderA with folderB ?

感谢

推荐答案

我最后一次检查(很久以前)有蚂蚁在没有远程同步任务(只的本地)。你将不得不的编写调用rsync的并的从蚂蚁执行这个代替。有一些远程任务虽然的。你可以从你的 VCS 的同步它代替到服务器。

Last time I checked (long ago) there was no remote sync task in Ant (only local). You would have to write a shell script that calls rsync and execute this from Ant instead. There is a number of remote tasks though. And you could check out your code from your VCS instead of syncing it to the server.

在阿里纳斯,你可能要考虑 Phing 的蚂蚁了。这是蚂蚁到PHP的端口。它有一个<一个href=\"http://blog.fedecarg.com/2008/07/21/filesynctask-using-phing-to-synchronize-files-and-directories/\"相对=nofollow> FileSync任务。您也可以添加自己的任务(写在PHP)和PHP的持续集成服务器是常用的。

On a sidenote, you might want to consider Phing over Ant. It's a port of Ant to PHP. It has a FileSync Task. You can also add your own Tasks (written in PHP) and is commonly used in Continuous Integration servers for PHP.

另请参阅<一个href=\"http://stackoverflow.com/questions/425692/what-is-your-$p$pferred-php-deployment-strategy\">What是你的preferred部署策略为PHP 和夫妇别人的。

这篇关于使用Apache Ant部署Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆