Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

organize maven multi-module project in eclipse

I have a huge Maven multi-module project. With similar structure

parentA
  - subA1
     - subA3
     - subA3
  - subA2

parentB
  - subB1
  - subB2

etc

The problem is, that parentA and subA1 does not contains any code inside it, but I can still see them in project explorer. But I would like to hide them or organize in tree hierarchy like in an explorer. Right now there are over 30 projects and just 20 of them contains Java code. Others simply contains others modules references. I see all 30 projects in plain form in project explorer.

The first idea - was using working set, but I can't include working set in another working set. What is the common practice to handle this issue for eclipse users

like image 362
user12384512 Avatar asked Jun 07 '12 09:06

user12384512


People also ask

How do I run a multi module project in Maven?

A multi-module project is built from an aggregator POM that manages a group of submodules. In most cases, the aggregator is located in the project's root directory and must have packaging of type pom. The submodules are regular Maven projects, and they can be built separately or through the aggregator POM.

How do I open multiple modules in eclipse?

To add modules, select eclipse-multi project in the Project Explorer and right click to open context menu. From the context menu, open Maven Project Wizard with New → Others → Maven and select Maven Module and click Next.

Can two Maven modules depend on each other?

Because modules within a multi-module build can depend on each other, it is important that the reactor sorts all the projects in a way that guarantees any project is built before it is required. The following relationships are honoured when sorting projects: a project dependency on another module in the build.


2 Answers

In Project Explorer, there's a down arrow, if you hover over it, it shows "View Menu".

Click on it, Project Presentation -> Hierarchical

like image 173
Zwakele Mgabhi Avatar answered Oct 18 '22 19:10

Zwakele Mgabhi


go: Windows -> Preferences -> Maven -> Hide folders of physically nested modules

and re-import your project.

like image 38
Mindaugas K. Avatar answered Oct 18 '22 17:10

Mindaugas K.