简体   繁体   中英

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, eg 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. 在此处输入图片说明

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

在此处输入图片说明

Question:

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

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/

您在项目浏览器中选择右下角的三角形(在右上角),然后选择“ Projects Presentation”和“ Hierarchical”。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM