maven 父子工程解决无法导入依赖包问题

出现的报错信息如下:

Failed to execute goal on project single-mvc-web: 
Could not resolve dependencies for project com.imooc:single-mvc-web:war:0.0.1-SNAPSHOT: 
The following artifacts could not be resolved: 
com.imooc:single-mvc-service-item:jar:0.0.1-SNAPSHOT

其中single-mvc-web single-mvc-service-item是parent项目下面的两个子项目。

解决方案: 首先打开父工程的pom.xml文件,先运行maven install,然后再debug/run子项目即可。

猜你喜欢

转载自blog.csdn.net/HelloCode1900/article/details/82958642