添加依赖出现以下问题
1.Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5
2.Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.4 from/to central (http://central.maven.org/maven2/): central.maven.org: nodename nor servname provided, or not known
3.maven工程中pom.xml的依赖报红,右侧出现红色下划线
解决方法:
1)点击右上角maven->reimport,未解决进行以下步骤
2)检查maven根目录,修改为自己安装的maven目录(若还未下载安装,参考https://blog.csdn.net/tigaobansongjiahuan8/article/details/92837341),如下图所示
为了方便自动导入依赖包,可勾选如下图选项