maven打包遇到Aggregator projects require 'pom' as packaging问题解决


springboot 多模块项目打包时遇到

[ERROR]     'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging. @ line 3, column 102

在parent 项目中的 pom.xml

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.5.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.abc</groupId>
    <artifactId>conve</artifactId>
    <version>1.0</version>
    <name>convert</name>
    <description>conve</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        ……
    </dependencies>

    <modules>
        <module>multiple</module>
        <module>single</module>
    </modules>
  ……

默认打包类型为jar

<packaging>jar</packaging>

解决的方法:

  修改打包类型pom

<packaging>pom</packaging>

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM