创建Maven聚合工程
![在这里插入图片描述](https://img-blog.csdnimg.cn/c07f838b0d104edaa115f2040ae29e0d.png)
一、构建父工程 fmmall
1.创建一个maven工程,packing设置为pom
2.父工程继承 spring-boot-starter-parent
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.7</version>
<relativePath/>
</parent>
<groupId>com.qfdeu</groupId>
<artifactId>fmmall</artifactId>
<version>2.0.1</version>
<modules>
<module>common</module>
<module>beans</module>
<module>mapper</module>
<module>service</module>
<module>api</module>
</modules>
<packaging>pom</packaging>
</project>
二、创建common工程
1.选择fmmall,右键–New–Module(Maven工程)
2.修改common的pom.xml,设置packing=jar
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>fmmall</artifactId>
<groupId>com.qfdeu</groupId>
<version>2.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>