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

自己用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..._第1张图片

再启动就OK了。 

你可能感兴趣的:(Maven)