问题:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'parent'. One of '{"http://m........
原因:
在使用多模块时,子模块总要指定聚合的 pom 为 <parent>,而该标签不能放在
<dependency></dependency>中
解决:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.codehaus.mojo</groupId>
<artifactId>my-parent</artifactId>
<version>2.0</version>
<relativePath>../my-parent</relativePath>
</parent>
<artifactId>my-project</artifactId>
</project>
参考: