Eugene Kuleshov wrote:
I import the parent project and then enable multi module resolution.
After this m2eclipse will arrange the source according to every child
module in the project.
1) Maven > Enable Dependency Management
2) Maven > Enable Nested Modules on the parent project
You don't really have to do that unless your projects already in
Eclipse workspace. Also, those options are available on Maven properties
page in project properties dialog.
First of all, "File / Import... / Maven projects" wizard by default
scans project hierarchy and allow you to import nested modules as
separate projects. We recommend this option because it provides closes
classpath resolution with Maven.
However, all Maven new project and import wizards have an expandable
"Advanced" section at the bottom where you can disable creation of
separate projects for nested modules.
Cool, I didn't know that. Most of the projects that I have Maven-enabled
have already been in Eclipse, but lately I have imported some from
scratch and used the old method out of habit. Thanks for the hints!
Another "bad old habit" missing some of the latest m2eclipse features
seems to be to check out projects from CVS or SVN and then
Maven-enabling them. The New Project > Maven > Checkout Maven Projects
from SCM option will certainly save time and clicks there!
If the above is not fine grained enough for you, try the "Allow output
folders for source folders" in the Java Build Path settings of your
parent project and start mapping source folders of child projects to
individual output directories. (Do this by expanding the source
folder, selecting the output folder and clicking "Edit..")
We don't recommend doing this for Maven projects, because those
settings would be overwritten once you run "Maven / Update Project
Configuration" action.
Yes, I should have added information that this is volatile. For me,
m2eclipse picking up POM paths with enabled nested modules work perfectly.
Regards,
Martin
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email