1.错误场景:spring
项目为springboot项目,maven聚合工程,分为app、api 、common、gongqiu四个项目,app、api 、common的父类是gongqiu,app和api依赖common,打包时报错common中的程序包xxx不存在,错误信息以下:apache
解决办法有两个:api
1.将ROOT中的spring-boot-maven-plugin更换成org.apache.maven.plugins,以下所示:springboot
更换为app
2.将spring-boot-maven-plugin的版本下降,以下所示:maven
运行结果:spring-boot
OVER3d