有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

IntelliJ的maven模块视图中的java第二根模块

我有一个具有父pom的多模块maven应用程序,如下所示:

<groupId>com.test</groupId>
<artifactId>uke-management</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>uke-management</name>
<packaging>pom</packaging>

<modules>
    <module>application</module>
    <module>user-management</module>
    <module>security</module>
    <module>workflow</module>
    <module>commons</module>
    <module>database</module>
    <module>contract-management</module>
    <module>file-management</module>
    <module>communication-management</module>
</modules>

现在在intelliJ的maven模块视图中,我可以看到所有模块,但是communication-management显示了两次,我不知道为什么。从我的应用程序的结构来看,它似乎不应该以根的形式出现,但却以某种方式出现。以下是communication-management的pom:

<modelVersion>4.0.0</modelVersion>

<parent>
    <artifactId>uke-management</artifactId>
    <groupId>com.test</groupId>
    <version>0.0.1-SNAPSHOT</version>
</parent>

<artifactId>communication-management</artifactId>

<properties>
    <spring-boot-starter-mail>2.1.5.RELEASE</spring-boot-starter-mail>
</properties>

<build>
    // some build plugins
</build>

<dependencies>
    <!-- project dependencies -->
    <dependency>
        <groupId>com.test</groupId>
        <artifactId>user-managment</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.mapstruct</groupId>
        <artifactId>mapstruct</artifactId>
        <version>1.2.0.Final</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-mail</artifactId>
        <version>${spring-boot-starter-mail}</version>
    </dependency>
</dependencies>

这就是我在IntelliJ中看到的:

enter image description here

为什么communication-management显示两次,为什么显示为root

我已经尝试过重新导入、清洁等


共 (2) 个答案

  1. # 1 楼答案

    我搬走了。扁平pom。来自故障模块的xml。不知怎的,它有着另一个版本。然后IDEA在运行时删除了注释为root的重复模块

  2. # 2 楼答案

    原来是智能问题,重启电脑就解决了。我认为这是不可复制的。我试图创建一些示例项目,但问题没有发生

    那句老话“你有没有试过把它关掉再打开一次”对我来说很管用