Invalid packaging for parent POM com.cloud:springcloud_demo:1.0-SNAPSHOT, must be “pom“ but is “jar“

子项目用maven打包的时候报错,

解决方法:父项目springcloud_demo的pom.xml指定打包方式:pom



    4.0.0

    com.cloud
    springcloud_demo
    1.0-SNAPSHOT

    
        org.springframework.boot
        spring-boot-starter-parent
        2.2.6.RELEASE
    

    pom

PS:子项目打包前,父项目要先打包否则会报错:

Could not find artifact com.cloud:springcloud_demo:pom:1.0-SNAPSHOT

你可能感兴趣的