我刚刚开始使用SpringSource,所以我决定从模板中创建一个Spring MVC项目。
但是,只要我创建模板,就会在pom.xml中收到以下错误
Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 () (org.apache.maven.plugins:maven-resources-plugin:2.5:resources:default-resources:process-resources)
Failure to transfer org.codehaus.plexus:plexus-container-default:pom:1.0-alpha-9-stable-1 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-container-default:pom:1.0-alpha-9-stable-1 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.pom
我尝试过多次重新安装SpringSource,但我仍然遇到同样的错误。我在64位Windows 7计算机上使用SpringSource 3.1.0 32位版本。
答案 0 :(得分:1)
我认为您需要更新Maven索引,以便下载模板所需的相应库。
转到窗口>偏好>行家
检查Download Repository index updates on startup
重启STS。
尝试再次下拉模板。
注意:下载所有索引可能需要一些时间。
答案 1 :(得分:0)
我删除.m2 / repository文件夹中的内容并重新创建项目(file-> new->)