最近学习maven时,真是错误重重啊。进入正题。
错误:
Failure to transfer org.codehaus.plexus:plexus:pom:1.0.12 from http://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.codehaus.plexus:plexus:pom:1.0.12 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.12/plexus-1.0.12.pom
结果:没起作用
------------------------------------------------------------------------------------------------------------------------------------------
结果:还是没解决问题。
大概意思是从http://repo.maven.apache.org/maven2 was cached in the local repository网址错误地转换成org.codehaus.plexus:plexus:pom:1.0.12文件。并且将这个文件进行了缓存。在中心仓库更新期间也没有重新尝试执行移除或者更新。
原本的错误:不能转换pom.xml中的artifact。
org.codehaus.plexus:plexus:pom:1.0.12 from/to central (http://repo.maven.apache.org/maven2)这个url连接另一个http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.12/plexus-1.0.12.pom的url超时了。
后面两行都是由于最前面的错误,才执行后面的。所以问题在加粗的地方。
发现plexus-1.0.12.pom.xml这个文件有问题,那么就给它删除重新生成呗。在本地仓库找到这个文件。
然后将里面的文件删除,然后使用打开eclipse重新生成:
解释:更新这个项目。
-------------------------------------------------------------------------------------------------------------------------------
执行更新这个依赖。
maven项目的pom.xml文件不再报错了。