Maven项目打包War包失败:Cannot access spring-milestones (https://repo.spring.io/milestone) in offline mode

Maven添加引用后,打包War时提示以下错误:

[ERROR] Failed to execute goal on project demo: Could not resolve dependencies for project com.example:demo:war:0.0.1-SNAPSHOT: Cannot access spring-milestones (https://repo.spring.io/milestone) in offline mode and the artifact javax.el:javax.el-api:jar:3.0.0 has not been downloaded from it before. -> [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

这是由于引用没有自动下载,执行以下命令即可:

mvn -U idea:idea

版权声明:本文为chen7991951原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。