eclipse juno中如何导入和运行ivy+ant项目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12436395/
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
How to import and run ivy+ant project in eclipse juno
提问by Mahmoud Saleh
this is my first use of ivy+ant and after building the project from command line, i want to import it into eclipse juno. the project folder (trunk) contains the following folders/files:
这是我第一次使用 ivy+ant,在从命令行构建项目后,我想将它导入到 eclipse juno 中。项目文件夹(主干)包含以下文件夹/文件:
- build
- dist
- src
- WebContent
- build.properties
- build.xml
- ivy.settings.xml
- ivy.xml
- 建造
- 区
- 源文件
- 网页内容
- 构建属性
- 构建文件
- ivy.settings.xml
- 常春藤.xml
i tried to import the trunk folder that contains the above files/folder using import existing projectsinto workspace, but i get the error that no projects found.
我尝试使用将现有项目导入工作区来导入包含上述文件/文件夹的主干文件夹,但我收到没有找到项目的错误。
pleases advise how to import this project.
请告知如何导入此项目。
UPDATE: i tried to configure the project for eclipse before importing using the following command:
更新:在使用以下命令导入之前,我尝试为 Eclipse 配置项目:
ant eclipse-default
but i get the following error:
但我收到以下错误:
Target "eclipse-default" does not exist in the project
项目中不存在目标“eclipse-default”
UPDATE 2:
更新 2:
i was able to import the project in eclipse as follows
我能够在eclipse中导入项目如下
File > New > Other > Java Project From Existing Ant Buildfile
文件 > 新建 > 其他 > 来自现有 Ant 构建文件的 Java 项目
but when trying to run the project on server, i can't find run on server in the run options, please advise.
但是当尝试在服务器上运行项目时,我在运行选项中找不到在服务器上运行,请指教。
回答by Lee Chee Kiam
You may try this:
你可以试试这个:
- Install IvyDE from http://www.apache.org/dist/ant/ivyde/updatesite(ref: http://ant.apache.org/ivy/ivyde/download.cgi)
- IvyDE may not recognize your setting and properties file. At Window -> Preference -> Ivy -> Settings, check reload the setting on demand, add Ivy setting path
ivysettings.xml
or your Ivy setting file, Property filesbuild.properties
or your Ant properties file. - Add new Java project you want to work on, point the path to your project.
- At the new project wizard, Libraries tab -> Add Library -> IvyDE Managed Dependencies.
- 从http://www.apache.org/dist/ant/ivyde/updatesite安装 IvyDE (参考:http: //ant.apache.org/ivy/ivyde/download.cgi )
- IvyDE 可能无法识别您的设置和属性文件。在 Window -> Preference -> Ivy -> Settings,勾选按需重新加载设置,添加 Ivy 设置路径
ivysettings.xml
或您的 Ivy 设置文件、属性文件build.properties
或您的 Ant 属性文件。 - 添加您要处理的新 Java 项目,将路径指向您的项目。
- 在新建项目向导中,Libraries 选项卡 -> Add Library -> IvyDE Managed Dependencies。
回答by Frederic
You can not import a project of you do not have the eclipse project information in your code. Either create a new eclipse project from existing source. Or a new java project from ant buildfile (your update 2).
如果您的代码中没有 eclipse 项目信息,则无法导入项目。从现有源创建一个新的 eclipse 项目。或者来自 ant buildfile 的新 java 项目(您的更新 2)。
For running need configuration of server (hard to know what youneed there), you may need to create new server (preference/server/run time environnement) (or from view server, right click "new")
为了运行需要配置的服务器(很难知道那里需要什么),您可能需要创建新服务器(首选项/服务器/运行时环境)(或从查看服务器,右键单击“新建”)