PHP编译Ant脚本 [英] build PHP with ant scripts

查看:163
本文介绍了PHP编译Ant脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道我是如何使用Ant来构建,我已经写在我的PHP Web应用程序?我GOOGLE了一下周围,我所看到的,这是可能的,但有没有基本的想法或它们的任何高级使用任何的例子。可以在任何你能帮我吗?

I was just wondering how I use Ant to build my web applications that I have written in PHP? I've googled around a bit and I have seen that it is possible but there are not any examples of the basic idea or any advanced use for them. Can any of you help me out?

谢谢!

推荐答案

虽然蚂蚁本身是用Java编写的,你可以用它来建立你想要的任何类型的应用程序。这里有一个基础教程和的full手动。除此之外,你需要澄清的是什么你想做的事在这里得到更precise答案。

While Ant itself is written in java, you can use it to build any kind of applications you want. Here's a basic tutorial and a full manual. Beyond that, you need to clarify what is it you want to do to get a more precise answer here.

更新(基于问题澄清):

复制/移动文件/文件夹是通过Ant容易。通过看我上面链接的Hello World的教程,并与文件集概念和熟悉的复制,的 MKDIR 移动任务开始。这里是另一个教程,显示如何设置一个基本的版本(忽略特定的Java的东西一样的javac /战争)。

Copying / moving files / folders is easy via Ant. Look through the "Hello World" tutorial I've linked above and Familiarize yourself with FileSet concept and Copy, Mkdir and Move tasks to get started. Here's another tutorial that shows how to set up a basic build (ignore java-specific stuff like javac/war).

在更改数据库是一个完全不同的主题。如果你有ALTER脚本准备好了,你可以使用Ant的 Exec的任务来调用你的数据库的命令行客户端运行这些脚本(虽然我可能不会在生产中做到这一点)。如果你想使用Ant的跟踪这些变化,那么你正在寻找错误的工具。 Liquibase 可用于做到这一点,这似乎是最近收到了很多牵引。这很像蚂蚁在某种意义上说,它是用Java编写的,但可以在任何环境下使用。我不是专家PHP所以我不知道是否有更多的东西PHP的面向可用。

Making changes to the database is an entirely different subject. If you have 'alter' scripts ready, you can use Ant's Exec task to invoke your DB's command-line client to run those scripts (though I probably wouldn't do it in production). If you want to use Ant to track those changes, then you're looking at the wrong tool. Liquibase can be used to do that and it seems to be getting a lot of traction lately. It's quite like Ant in the sense that it's written in Java but can be used in any environment. I'm no PHP expert so I wouldn't know if there's something more PHP-geared available.

这篇关于PHP编译Ant脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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