聚合继承
- parent@聚合 pom.xml
<modules>
<module>XXXXXX-web</module>
<module>XXXXXX-service</module>
<module>XXXXXX-dao</module>
</modules>
- children@继承 pom.xml
<parent>
<groupId>XXX.XXXXXX.XXX</groupId>
<artifactId>ParentProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
- apache-maven-3.6.3\conf\settings.xml
<servers>
<server>
<id>XXXXXX_maven_release</id>
<username>XXXXXX</username>
<password>XXXXXX</password>
</server>
<server>
<id>XXXXXX_maven_snapshot</id>
<username>XXXXXX</username>
<password>XXXXXX</password>
</server>
</servers>
- provider pom.xml
<distributionManagement>
<repository>
<id>XXXXXX_maven_release</id>
<url>http://127.0.0.1:8081/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>XXXXXX_maven_snapshot</id>
<url>http://127.0.0.1:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
- consumer pom.xml
<repositories>
<repository>
<id>XXXXXXnexus</id>
<url>http://127.0.0.1:8081/repository/maven-public/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>