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

醉酒当歌 提交于 2019-12-09 12:14:18

问题


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:


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.




回答2:


Looks like support for this feature was recently removed:

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




回答3:


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

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



来源:https://stackoverflow.com/questions/2609938/what-happened-to-the-enable-nested-modules-option-in-m2-eclipse

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