【问题标题】:SpringSource Spring MVC Template errors when created创建时 SpringSource Spring MVC 模板错误
【发布时间】:2012-11-16 04:22:39
【问题描述】:

我刚刚开始使用 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 位版本。

【问题讨论】:

    标签: java spring spring-mvc springsource


    【解决方案1】:

    我认为您需要更新 Maven 索引,以便它可以下载模板所需的适当库。

    • 转到窗口 > 首选项 > Maven

    • 查看Download Repository index updates on startup

    • 重启 STS。

    • 再次尝试下拉模板。

    注意:下载所有索引可能需要一些时间。

    【讨论】:

    • 检查Update Maven projects on startup box 使它对我有用。谢谢!
    • @Titandrake 很高兴我能帮上忙。
    【解决方案2】:

    对我来说,删除 .m2/repository 文件夹中的内容并重新创建项目(文件-> 新建->)有效

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-26
      • 1970-01-01
      • 1970-01-01
      • 2015-02-03
      • 2013-04-19
      相关资源
      最近更新 更多