创建maven项目时报错,
1、已经尝试过网上说的删除repository下plugins文件夹内所有东西再update仍然报错。
删除地址:D:\Eclipse\maven\maven-repository\org\apache\maven\plugins
update选项在创建到一半的maven项目上右键,maven->update project
2、我的解决方法:
直接把项目删了重建,突然发现项目创建很慢,卡住在10%左右就没了,再看报错:最底下有一个org.apache.maven.plugins:maven-resources-plugin:jar:2.6 from/to central (https://repo.maven.apache.org/maven2): connect timed out,
下载太慢连接超时,打开setting.xml看看自己的镜像配对没有,结果发现之前配了没保存,绝了,把镜像补上。然后就成了。
提醒自己以后虽然英语不太好,但是还是得耐着性子逐字逐句看下去,看不懂的拿到有道翻译去,错误信息还有一些线索的。
<mirror><id>alimaven</id><mirrorOf>central</mirrorOf><name>aliyun maven</name><url>http://maven.aliyun.com/nexus/content/repositories/central/</url></mirror>
错误代码:
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failure to transfer org.apache.maven.plugins:maven-resources-plugin:jar:2.6 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:jar:2.6 from/to central (https://repo.maven.apache.org/maven2): connect timed out
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failure to transfer org.apache.maven.plugins:maven-resources-plugin:jar:2.6 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:jar:2.6 from/to central (https://repo.maven.apache.org/maven2): connect timed out