'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging.
打包方式为jar包的打包方式无效,多模块项目需要POM的打包方式

第二个箭头的地方指明了出问题的地方,
The project com.changgou:changgou_web:1.0-SNAPSHOT (C:\JavaProject\07changgou_class\changgou_parent_3622\changgou_web\pom.xml) has 1 error
[ERROR] 'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging. @ line 4, column 109
到出问题的pom.xml中一看,它含有子模块,即它是多模块聚合,打包方式应该为pom
但是pom.xml中漏写了打包方式,所以要填上打包方式即可

添加上打包方式就好了!
<packaging>pom</packaging>

多模块聚合时,parent父模块的packaging类型是pom,可以在parent父模块的pom中定义<modules>来包含下面的子模块,相应的子模块packaging类型才是jar;
聚合模块打包方式为pom, 单模块打包方式是jar

如果对你有用就点个赞
版权声明:本文为m0_60204745原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。