d-man
d-man

Reputation: 58103

Maven Multiple module project in Eclipse issue

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

mvn eclipse:eclipse

and it shows child modules as following.

enter image description here

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.

enter image description here

Upvotes: 1

Views: 1598

Answers (2)

Powerlord
Powerlord

Reputation: 88826

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

Eclipse Maven Import

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

Maven Import projects

Upvotes: 1

Anthony Accioly
Anthony Accioly

Reputation: 22481

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.

Importing multiple projects

Source: m2eclipse-book

Upvotes: 0

Related Questions