Maven打包项目时异常:Cannot access nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public) in offline mode and

发布时间 2023-11-11 11:10:25作者: 陈俊俊

package是报错

Cannot access nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public) in offline mode and the artifact org.apache.maven.surefire:maven-surefire-common:pom:2.22.2 has not been downloaded from it before.

根据翻译的意思:

无法在脱机模式下访问nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public),并且之前没有从该文件下载过工件org.apache.maven.surefire:maven-surefire-common:pom:2.22.2。

解决方法:在设置找到maven的配置,取消Work_offline的勾选,再次package即可