SpringBoot项目 maven打包时候提示程序包xxx不存在

A模块依赖B模块

A打包的时候会报程序包xxx不存在

这时候我们看下B模块的pom.xml文件是否加了

 <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

如果A模块不是springbootweb项目 就不要加这个插件

去掉之后重新把B模块打包 就可以了

-----------------------有任何问题可以在评论区评论,也可以私信我,我看到的话会进行回复,欢迎大家指教------------------------ (蓝奏云官网有些地址失效了,需要把请求地址lanzous改成lanzoux才可以)
原文地址:https://www.cnblogs.com/pxblog/p/14814322.html