Intellij always removes maven module from group

Answered

Hello everyone,

I just don't get Intellijs Maven-Module-mechanism. I'm trying to create a maven multimodule project, but strange things happen... I I create a parent module with just a pom and two submodules "core" and "web", the parent is not displayed in the "Project" view, I just see the two submodules. Also, in the Maven-Window, the parent-module is dark grey.

Also, if I try to group those two modules, Intellij sometimes removes one module from this group. I don't know why, and I haven't figured out yet what triggeres that behaviour, but it only happens in this new project-setup. I've got several other maven projects, but it doesn't happen there at all!

5 comments
Comment actions Permalink

See the following issues:

https://youtrack.jetbrains.com/issue/IDEA-139882
https://youtrack.jetbrains.com/issue/IDEA-106669

Normally you should create a root pom.xml file that will link all the child poms and define the dependencies between them, then just open this root pom.xml in IntelliJ IDEA.

0
Comment actions Permalink

You mean "link all the child-poms", didn't you? ;-) Thanks for the issue-links!

0
Comment actions Permalink

Yes, corrected, thanks.

0
Comment actions Permalink

so do you open a separate project for parent project?

0
Comment actions Permalink

>so do you open a separate project for parent project?

You open just the one parent pom.xml (which is the main pom.xml of the multi-module maven project) and IDE will automatically add all child modules to the project.
0

Please sign in to leave a comment.