简体   繁体   English

如何在Eclipse(.ear)中向EJB项目添加Normal Java项目功能?

[英]How can I add Normal Java project capabilities to EJB project in Eclipse (.ear)?

Just started working with EJB (already developed project). 刚开始使用EJB(已经开发的项目)。

Imported the project from git and converted it to Maven project. 从git导入项目并将其转换为Maven项目。 However the project looks like a normal folder structure unlike regular java project. 但是,该项目看起来像普通的文件夹结构,与常规的Java项目不同。 I cannot have any eclipse Java capabilities in side those files. 这些文件旁边没有任何Eclipse Java功能。 Though they are Java files they look like class files to me with different symbol (can see that in image). 尽管它们是Java文件,但对我来说,它们看起来像是类文件,带有不同的符号(可以在图像中看到)。

It won't compile unless I do maven build. 除非我做过Maven编译,否则它不会编译。 Eclipse not showing any errors for those files even there are compile errors. 即使存在编译错误,Eclipse也不显示这些文件的任何错误。

Running each time maven kills time and its irritating too. 每次运行Maven都会浪费时间及其烦人的时间。

在此处输入图片说明

Any help will be greatly appreciated. 任何帮助将不胜感激。 How to make that a normal Java project with eclipse compiler capabilities. 如何使具有eclipse编译器功能的普通Java项目。

What configuration I have to do achieve this ? 我必须做些什么配置才能做到这一点?

在此处输入图片说明

Try running the command mvn eclipse:eclipse from the root folder of the project. 尝试从项目的根文件夹运行命令mvn eclipse:eclipse It will create eclipse configuration files after which the project can be imported in Eclipse. 它将创建eclipse配置文件,之后可以将项目导入Eclipse。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM