之前一直用springmvc做多moudle开发,第一次用springboot做多moudle,发现maven配置还是有些不同的,这个问题也困惑了我两天,今天终于解决了。
提示的错误信息如下:
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 3.688 s
[INFO] Finished at: 2018-01-19T12:22:21+08:00
[INFO] Final Memory: 46M/404M
[INFO] ————————————————————————
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project admin-console: Compilation failure: Compilation failure:
[ERROR] /Users/xxx/Workspace/xxx-server/admin-console/src/main/java/com/xxx/xxx/admin/Demo.java:[3,38] 程序包com.xxx.xxx.commons.model不存在
[ERROR] /Users/xxx/
解决办法是需要给被依赖moudle的pom.xml添加
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${springboot.version}</version>
<configuration>
<classifier>exec</classifier>
</configuration>
</plugin>
</plugins>
</build>
参考链接:https://segmentfault.com/q/1010000011151233/a-1020000011151428
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/qq_25667339/article/details/79105439
内容来源于网络,如有侵权,请联系作者删除!