Maven Multiple module project in Eclipse issue

依然范特西╮ 提交于 2019-12-24 17:14:55

问题


I have multiple module maven project which i imported in eclipse.

mvn eclipse:eclipse

and it shows child modules as following.

problem is it is not recognizing any of the child modules java files. if hover objects it does not show up any thing and consider as plain text files. it complains that it is not in build path ???

any idea how to fix or how to import multip modules maven project in eclipse.


回答1:


Maven support is included in Eclipse Kepler. You can find it in the File -> Import screen as Maven -> Existing Maven Projects.

Selecting a directory with a parent POM in it will prompt you to import all its children as well.




回答2:


If you really want to go down thatroad check out this old school method with eclipse:eclipse and multi-module import plugin.

But I have a different suggestion. Remove all eclipse:eclipse generated files, download m2e (new versions of Eclipse already include it). Then just use m2e Import Maven Project feature. It will recognize nested pom.xml files and let you create separate projects out of the ones you choose to work with.

Source: m2eclipse-book



来源:https://stackoverflow.com/questions/24437518/maven-multiple-module-project-in-eclipse-issue

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!