Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happened to the "Enable Nested Modules" option in m2-eclipse?

I contribute to and implement some open source projects that use a Maven2 build system organized into several sub-modules. I've also been an Eclipse user for several years. With these projects, I have historically leveraged the maven-eclipse plugin so that Eclipse can correctly recognise library dependencies in my project.

It used to be the case that -- when I set up a new workspace or project -- I would have to right-click select "Enable Dependency Management" followed by right-click "Enable Nested Modules." Once I did these things, maven & eclipse would find dependent libraries properly in my .m2 local repo.

But in my most recent install of Eclipse/m2-eclipse -- Eclipse Build 20100218-1602, m2-eclipse 0.10.0.20100209-0800 (sorry, the "About" dialog doesn't provide anything better than that) -- the "Enable Nested Modules" option is missing. Nor does the project seem willing to find my nested modules without it.

After much digging and some trial & error, I got the IDE to recognize my sub-modules by setting...

includeModules=true

In my org.maven.ide.eclipse.pref file manually.

But my question is: what gives? Why did this option disappear? Is there some newer, better way that I should be using m2-eclipse to find nested modules? How are other Maven & Eclipse users dealing with this issue?

like image 627
Drew Wills Avatar asked Apr 09 '10 18:04

Drew Wills


3 Answers

The thing here is the option to enable nested modules was moved to the Window >Preferences > Maven. Set the Support multiple Maven modules mapped to single Eclipse Workspace project checkbox, right click your project, navigate to Maven menu item you can find the 'Enable nested modules' option.

like image 87
sriniatiisc Avatar answered Nov 15 '22 07:11

sriniatiisc


Looks like support for this feature was recently removed:

https://issues.sonatype.org/browse/MNGECLIPSE-2291

like image 43
Joffer Avatar answered Nov 15 '22 06:11

Joffer


Why did this option disappear? Is there some newer, better way that I should be using m2-eclipse to find nested modules?

Could this be somehow related to the option below (accessible via Windows > Preferences > Maven):

alt text

To be honest, I'm not 100% sure because I don't create my projects under Eclipse, I create them on the command line outside Eclipse and import them as Existing Maven Projects (and this works with nested modules).

like image 22
Pascal Thivent Avatar answered Nov 15 '22 07:11

Pascal Thivent