eclipse 如何使用 ant build.xml 导入现有的 java web 项目

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3082256/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 14:50:13  来源:igfitidea点击:

How to import existing java web projects with ant build.xml

eclipseant

提问by Don Ch

I am trying to import an existing java web projects (built using ant build.xml) into Eclipse, using the Import functionality, but Eclipse does not recognize it as a project.

我正在尝试使用导入功能将现有的 java web 项目(使用 ant build.xml 构建)导入 Eclipse,但 Eclipse 无法将其识别为项目。

How can I import the projects into eclipse?

如何将项目导入 eclipse?

--- Edit --- What I did was to import the project as Java project. Yes there is an option in Eclipse 3.5 to import ant project into eclipse. New Project -> Java Project -> Import Ant project(or something similar).

--- 编辑 --- 我所做的是将项目导入为 Java 项目。是的,Eclipse 3.5 中有一个选项可以将 ant 项目导入 Eclipse。新建项目 -> Java 项目 -> 导入 Ant 项目(或类似项目)。

回答by Jessica Chiang

For Juno, do File->New->Other, then select File -> New -> Other, and at the New dialog, select Java Project from Existing Ant Buildfile

对于 Juno,执行 File->New->Other,然后选择 File -> New -> Other,在 New 对话框中,从 Existing Ant Buildfile 中选择 Java Project