IDEA 中Maven无法自动导入依赖,首次添加Maven plugins无法下载Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin,pom.xml依赖项无法下载Could not transfer artifact javax.servlet:javax.servlet-api:pom
【!!!!!!后续补充:考虑到可能是因为对https协议的支持问题才导致自动导入依赖失败,所以解决方法第2、3步添加参数后在手动点击命令时增加了对https的支持才会下载成功,因此后面在IDEA->File->Settings->Maven->Importing->VM options for importer中同样增加上述参数(即:-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true),发现自动导入也是可以的了!!!】
错误内容:Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to alimaven (https://maven.aliyun.com/repository/central): Transfer failed for https://maven.aliyun.com/repository/central/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
最终解决方式:
1.设置镜像
2.IDEA->File->Settings->Maven->Runner->VM options:增加-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
3.双击右侧的clean开始了下载,多双击几个之后全部下载完成。