Maven,单独建立一个子模块

Maven,单独建立一个子模块,maven,Maven,我有一个多模块项目。根模块具有pom 当我尝试构建整个项目时,效果很好。当我尝试构建一个与我的项目中的其他模块没有依赖关系的模块时——效果很好。当我试图构建一个依赖于其他项目子模块的模块时,它会失败,并显示一条消息 Failed to execute goal on project controller: Could not resolve dependencies for project org.template:controller:ejb:1.0-SNAPSHOT: Failed to c

我有一个多模块项目。根模块具有
pom

当我尝试构建整个项目时,效果很好。当我尝试构建一个与我的项目中的其他模块没有依赖关系的模块时——效果很好。当我试图构建一个依赖于其他项目子模块的模块时,它会失败,并显示一条消息

Failed to execute goal on project controller:
Could not resolve dependencies for project org.template:controller:ejb:1.0-SNAPSHOT:
Failed to collect dependencies for [***full list of dependencies***]:
Failed to read artifact descriptor for org.template:model:jar:1.0-SNAPSHOT:
Could not find artifact org.template:root-module:pom:1.0-SNAPSHOT
似乎它遗漏了根模块的pom

<artifactId>controller</artifactId>
<packaging>ejb</packaging>

<parent>
    <groupId>org.template</groupId>
    <artifactId>app-settings</artifactId>
    <version>1.0-SNAPSHOT</version>
    <relativePath>../root-module</relativePath>
</parent>
这是子模块pom的一部分,链接到根模块

<artifactId>controller</artifactId>
<packaging>ejb</packaging>

<parent>
    <groupId>org.template</groupId>
    <artifactId>app-settings</artifactId>
    <version>1.0-SNAPSHOT</version>
    <relativePath>../root-module</relativePath>
</parent>
控制器
ejb
org.template
应用程序设置
1.0-快照
../root模块
我做错了什么?

我找到了解决方案: