euraad
euraad

Reputation: 2836

How can I create a multi module project in Eclipse/Maven - Just ONE big project

I don't normally open the pom.xml file and I always using the graphical user friendly interface (GUFI) in Eclipse when I create a maven project.

I'm right now reading a course where my teacher show how to create a multi module project in Intellij. The problem is that I have Eclipse.

He create a multi module project, where there is ONE big project and inside the project there are modules, e.g sub-projects with own pom.xml files.

When I create a project named Topp and a module named Sopp, it will looks like this in Eclipse. enter image description here

But inside the project folder, it looks as it should do.

enter image description here

Question:

Is there a way to make it look so the module Sopp is inside the Topp project in Eclipse Project Explorer?

Upvotes: 0

Views: 381

Answers (2)

J Fabian Meier
J Fabian Meier

Reputation: 35795

You choose the downward triangle in the project explorer (on the right top corner), then you choose "Projects Presentation" and then "Hierarchical".

Upvotes: 1

Sagar Kharab
Sagar Kharab

Reputation: 369

Your parent pom should have like this

 <modules>
    <module>submodule1</module>
    <module>submodule2</module>
    <module>submodule3</module>
</modules>

Packaging of parent should be pom.

<packaging>pom</packaging>

It will pick up itself. Refer this http://websystique.com/maven/creating-maven-multi-module-project-with-eclipse/

Upvotes: 1

Related Questions