在Eclipse中,我发现Ant可以很容易地为我的项目导出构建文件。它提供了对第三方库和一些基本目标的引用。我在我的全局构建文件中使用它。唯一困扰我的是,如果在项目结构中修改了一些东西(比如添加了一个新的第三方库),我们必须思考(是的,这有时会很难!)关于重新生成那个build.xml文件。我想知道这里是否有人知道自动更新它的方法。说“自动”,我的意思是没有必要在每次需要时都显式地要求重新生成它。但我不知道是什么触发的。
对此有什么想法或知识吗?
谢谢!
MJ
发布于 2017-12-19 09:09:08

中
- Check the project in list.
- Uncheck the option "Create target to compile project using Eclipse compiler" - because we want to create a build file which is independent of Eclipse.
- Leave the Name for Ant buildfile as default: build.xml

build.xml文件,如下所示:
build.xml文件以在Ant编辑器中打开其内容:
source
https://stackoverflow.com/questions/4185921
复制相似问题