简体   繁体   English

如何在IntelliJ IDEA中将Maven多模块项目的嵌套模块显示为顶级模块?

[英]How to show Maven multi-module project's nested-modules as top level modules in IntelliJ IDEA?

I am using IntelliJIDEA 14 and recently switched from Eclipse. 我正在使用IntelliJIDEA 14,最近刚从Eclipse切换到该版本。 In Eclipse we can import any of the nested modules as top level projects and I am trying to do the same in IntelliJ. 在Eclipse中,我们可以将任何嵌套模块导入为顶级项目,而我正在IntelliJ中尝试这样做。

I am trying to open a maven multi-module project and want to see the nested modules as top level modules in IntelliJ. 我正在尝试打开一个Maven多模块项目,并希望将嵌套模块视为IntelliJ中的顶级模块。

But when I Open/Import Root Maven module (pom package type) only the root module is being displayed as top level project and all the nested modules are being displayed under root module directory hierarchy. 但是,当我打开/导入Root Maven模块(pom软件包类型)时,只有根模块显示为顶级项目,而所有嵌套模块都显示在根模块目录层次结构下。

Why I need this is my maven project has 3 to 4 levels of hierarchy(Broadleaf application). 我为什么需要这个是我的Maven项目具有3到4个层次的层次结构(Broadleaf应用程序)。 Navigating through all these modules only from root directory is painful. 仅从根目录浏览所有这些模块是很痛苦的。

Is there a way to do it? 有办法吗?

Are you referring to the Maven Projects view? 您是指Maven Projects视图吗? You can tweak it to discard hierarchy view by unselecting Group modules . 您可以通过取消选择“ Group modules来调整它以放弃层次结构视图。 Click on that little icon on the right to get the popup. 单击右侧的小图标以弹出窗口。

在此处输入图片说明

Edit: 编辑:

When referring to Projects view, one can change the the facet to Packages : 引用“ Projects视图时,可以将构面更改为Packages

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 maven多模块项目中如何构建依赖模块 - How to build dependent modules in maven multi-module project IntelliJ IDEA与Eclipse的Maven嵌套多模块项目中的Jetty资源基础不同 - Jetty resource base different in Maven Nested Multi-module project of IntelliJ IDEA vs Eclipse 更新多模块 Maven 项目中模块的版本号 - Updating version numbers of modules in a multi-module Maven project 使用不同的相对路径将模块添加到Maven多模块项目中 - Add modules to a maven multi-module project with different relative paths Maven:如何在多模块项目中构建其他模块之前运行模块? - Maven: How to run module before building other modules in multi-module project? 如何为多模块Maven项目的每个模块创建自包含(独立)的jar - How to create self-containing (standalone) jar of each modules of a multi-module maven project 如何在Intellij Idea中指定多模块项目的编译顺序? - How to specify the compile order for a multi-module project in Intellij Idea? 如何在其中一个模块中构建没有主类的多模块 Maven 项目 - How to build a multi-module Maven project without a main class in one of the modules 如何在 IntelliJ 中构建多模块 Maven JavaFX 项目 - How to build a multi-module Maven JavaFX Project in IntelliJ 在多模块Maven项目中的模块之间共享src / test类 - Sharing src/test classes between modules in a multi-module maven project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM