Maven and multi-module management

Hi, (again using build 7041)

I'm sending this out for people used to using Maven, and Maven within IDEA, for feedback and suggestions. I myself am pretty new to Maven. I'm wondering how people are integrating the new Maven functionality vis-a-vis multi-module projects. I am on a project with a large existing codebase which has been converted over to use Maven 2. The codebase is divided into different modules, some of which have sub-modules. There is no master POM listing all sub-modules. Usually different parts of the team will specialize/focus on one module or another; you could imagine something like rich-client, backend and reporting modules (just so we have something to talk about).

My role crosses module boundaries so I'd like to have these in the same IDEA project, but would like to take advantage of the Maven 2 integration. While I can import a POM as a project, I can't import a POM as a project module--so I'm thinking maybe I should import each module POM into its own project, then create a top-level project and import each of those IMLs. I have no idea if IDEA, in that case, will be able to manage the multiple POM files included, or if that's even the way to approach this.

2 comments

I've seen it's possible to import a (or multiple) pom in the current project, would that solve your problem ?

And, i would expect it possible (although i've not tried) to create a pom-packaging pom which would refer to all modules you want to include in your project. Didn't try though.

0

I found that option after I posted--when importing a POM, you can import into the current project and it will be imported as a module. I was able to do this, as well as search (from a top level directory) for all POMs and import those. It correctly picked up nested modules and automatically created module groups for those.

So far it seems OK, I guess I need to wait until the documentation is updated. Right now I'm happy to have better Maven support in IDEA and it looks promising. I'll mark my question as answered, though if anyone has further advice about using Maven within IDEA, please post.

Thanks
Patrick

0

Please sign in to leave a comment.