Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.2 or one of its dependencies could not be resolved
Linux系统下安装配置maven后执行mvn -v 无误,在其他地方打包出错
报错如标题所示
解决:
找到maven的conf目录下,vim设置setting.xml,配置镜像
#修改镜像源为阿里云
vim apache-maven-3.6.3/conf/settings.xml
#找到<mirrors>标签在标签里面添加阿里云镜像配置
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>