吖聪

导航

 

父POM
<modules>
<module>all-common</module>
</modules>
<packaging>pom</packaging>
不添加packaging会出现一下error
Project build error: Invalid packaging for parent POM com.test:hello-parent:0.0.1-SNAPSHOT (E:\eclipse-workspace\hello-parent\pom.xml), must be "pom" but is "jar"

子POM
parent改成父POM属性
<parent>
<groupId>com.clan</groupId>
<artifactId>all</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
</parent>
完成后子POM可以使用父POM依赖。
posted on 2021-08-16 18:35  吖聪  阅读(762)  评论(0)    收藏  举报