解决IDEA中Maven-install命令显示'XXX包'或'XXX类'不存在的问题

聚合工程中,存在A项目依赖B项目的情况下,我们在B项目(被依赖项目)的pom文件做如下配置:

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

 就是在原来的maven插件中增加一个配置:

            <configuration>
                <skip>true</skip>
            </configuration>

这样就不会打包到Boot-Inf中,配置完后点击clean-install,成功!

[INFO] Reactor Summary:
[INFO] 
[INFO] demo ............................................... SUCCESS [ 0.393 s]
[INFO] common ............................................. SUCCESS [ 0.003 s]
[INFO] test ............................................... SUCCESS [ 0.002 s]
[INFO] eureka ............................................. SUCCESS [ 0.003 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

 

posted @ 2020-07-08 10:12  mhx_pyw  阅读(554)  评论(0编辑  收藏  举报