与IDE相比,我们还需要Ant吗? [英] Compare to the IDE for Java,do we still need Ant?

查看:161
本文介绍了与IDE相比,我们还需要Ant吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不久之前,我已经开始使用Ant,并使用它做简单的练习(编译,单元测试,打包)。现在我通常的工作是在Eclipse下进行java开发,通常的工作都可以通过Eclipse的功能简单完成:即时编译,点击按钮部署,各种向导。

Not long before I had digged into Ant and use it doing simple practice(compile,unit test,package).Now my usual work is under Eclipse for java development,the usual work can all be simply done through Eclipse' function:in-time compiling、click button to deploy、various wizard..

所以我想知道在Eclipse下我们需要Ant。
如果是,我们应该在哪个方面使用Ant和Eclipse。

So I am wondering under Eclipse do we have a need for Ant. And if it is, at which aspect should we use Ant along with Eclipse.

推荐答案

构建应用程序不是关于只需在IDE中构建它们。您需要设置可以运行的自动化构建和部署方法,例如持续集成和部署。建造的包装必须被合并到各种环境中,最终生产。你不能用自己的方框构建它们。您无法从IDE中构建它。您需要单独的构建系统。那就是ANT中的构建工具如何进入。

Building applications is not about just building them in your IDE. You need to setup an automated build and deploy method that can be run for, say, continuous integration and deployment. The built package has to be deloyed to various environments and finally production. You cannot build them out of your own box. You cannot build it out of your IDE. You need separate build system. That is where build tools like ANT come in.

还要注意,IDE的构建,部署的功能是有限的,而不是它们的实力。然而,可以使用ANT及其构建脚本和将它们从eclipse中运行。这样,您可以为本地(开发人员)构建和主构建过程提供单一脚本集。使用基于JAVA的ANT,您也可以通过编写自定义任务等来满足您的需求。

Also note that the capabilities of IDEs for doing build, deploy is limited and that is not their strength. It is, however, possible to make use of ANT and its build scripts and run them out of eclipse. This way, you have a single set of scripts for both your local ( developer ) build and the main build process. With ANT being JAVA based, you can also suit your build tool to your needs by writing custom tasks etc.

此外,当您使用标准的ANT作为您的构建系统,您可以移动到不同的IDE,如Intellij IDEA,仍然使用您知道的构建系统。

Also, when you make use of something as standard as ANT for your build system, you can move to a different IDE like Intellij IDEA and still make use of the build system that you know.

这篇关于与IDE相比,我们还需要Ant吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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