views:

576

answers:

2

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?

+1  A: 

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).

Pascal Thivent
I don't create projects using eclipse either. Normally the project already contains source, configuration, and a system of nested pom.xml files already. I just do "New Java Project" and "from existing source." If it's a completely "green field" project, I use archetype:create or simply hand-create a pom.xml.
Drew Wills
@Drew Ok, same here then.
Pascal Thivent
+2  A: 

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.

sriniatiisc
Thanks! I know there must be someone on the planet who understood this issue.
Drew Wills