我有一个带有父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
显示了两次,我不知道为什么。从我的应用程序的结构来看,它似乎不应该作为root可见,但不知何故它确实可见。以下是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中看到它的方式:
为什么communication-management
会显示两次?为什么会显示为根?
我已经尝试过重新导入、清理等。
发布于 2019-05-28 03:28:03
原来是IntelliJ的问题,重启PC解决了这个问题。我不认为这是可报告的。我试图创建一些示例项目,但没有出现问题。
老生常谈的“你有没有试过一次又一次地关掉它”对我来说很管用。
发布于 2021-03-27 00:14:38
我从故障模块中删除了.fltened-pom.xml。不知何故,它有另一个版本。然后IDEA在运行时删除了注释为root的重复模块。
https://stackoverflow.com/questions/56329330
复制相似问题