西双版纳植物园种有:如何在eclipse中进行ant?

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 03:55:38
具体应该怎么来实现呢?

1、搭建相应的环境,如果你的eclipse已经安装好了java相关的插件,那么只需要把ant相关的插件要装好。
2、一般的项目基于ant的都是跟自动编译有关,你需要在你的项目中建立build.xml,也就是编译文件。
3、直接可以在build中编辑,一般分为多个目标,即target,如make,build,clear,javadoc,junit,mail.....视具体情况编写。
4、eclipse有相应的ant选项,在run中选取ant build,设定相应选项,就可以实现ant了!

1 安装Ant并设置环境变量;
2 Eclipse中在你的项目里新建test.xml;
3 设定编辑器(windows->preferences->General->Editors->File Associations->选择*.xml,分配editors default为Ant Editor);
4 使用Ant Editor编辑test.xml档(设置project,property,target等)=>test.xml右键选择Open With ...;
5 运行Ant构建文件test.xml右键选择Run as->Ant Build。
到这里就差不多了,希望对你有帮助。更多参考Eclipse&Ant相关书籍。