Maven 项目和 Eclipse 工作区
我使用 Netbeans 已经有一段时间了,现在正在转向 Eclipse。
基本上我有一个 Maven 项目,我想使用 Eclipse 来处理它。
我不确定的是我是否需要将 Eclipse 工作区指向我的项目 super pom 所在的目录,或者 Eclipse 工作区是否需要指向干净/空目录。
我的问题基本上是:
- 源文件最终位于 Eclipse 工作区目录中吗?
有人可以建议吗?
问候,
I have been working with Netbeans quite a while and I am now moving to Eclipse.
Basically I have a Maven project that I would like to work on using Eclipse.
What I am not sure about is whether I need to point my Eclipse workspace to the directory where my project super pom is located or whether the Eclipse workspace needs to point to a clean/empty directory.
My question is basically:
- Are the source files eventually located in the Eclipse workspace directory?
Can anyone please advise?
Regards,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您安装了 m2e 或 m2eclipse 插件,您只需执行“导入...”,然后执行“现有 Maven 项目”并将其指向 super-pom。它将导入它找到的所有模块,作为单独的项目。
If you have the m2e or m2eclipse plugin installed, you can just do "Import..." then "Existing Maven Projects" and point it at the super-pom. It'll import all the modules it finds, as separate projects.
您可以使用maven eclipse目标生成项目文件,以便可以直接在eclipse工作区中移动它们:
mvn eclipse:eclipse
插件信息
you can use the maven eclipse target to generate project files so you can move them directly in the eclipse workspace:
mvn eclipse:eclipse
info on the plugin
工作区文件夹中是否有源文件取决于个人喜好。 Eclipse 可以从任何文件夹导入您的项目。就我个人而言,我将项目文件夹与工作区文件夹分开。
It's a matter of personal preference whether you have the source files in the workspace folder or not. Eclipse can import your project from any folder. Personnaly, I keep my projects folder separated from the workspace folder.