maven多模块项目启动工程报错Could not resolve dependencies for project…

导读:本篇文章讲解 maven多模块项目启动工程报错Could not resolve dependencies for project…,希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com

自己用maven搭建ssm项目。启动的时候发生错误,以下是日志信息。

[INFO] Total time: 1.140 s
[INFO] Finished at: 2019-04-25T15:09:26+08:00
[INFO] Final Memory: 7M/76M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project manager: Could not resolve dependencies for project test-ssm:manager:pom:0.0.1-SNAPSHOT: Could not find artifact test-ssm:common:jar:0.0.1-SNAPSHOT -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

日志错误提示:

Failed to execute goal on project manager: Could not resolve dependencies for project test-ssm:manager:pom:0.0.1-SNAPSHOT: Could not find artifact test-ssm:common:jar:0.0.1-SNAPSHOT -> [Help 1]

意思是:

未能在项目管理器上执行目标:无法解析项目测试SSM的依赖项:管理器:pom:0.0.1-快照:找不到项目测试SSM:common:jar:0.0.1-快照->[帮助1]

解决方法:

       在eclipse中选中common项目模块——>右键——>Run As——>Maven install。将common打成jar包。

完成后日志显示如下:

maven多模块项目启动工程报错Could not resolve dependencies for project...

再启动就OK了。 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/15971.html

(0)
小半的头像小半

相关推荐

极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!