1

我正在使用 spring 和 maven 创建一个新项目,我正在使用 spring 源工具。我创建了 spring web maven 项目。pom.xml 创建如下

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
         http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.springframework.samples.service.service</groupId>
  <artifactId>SpringWeb</artifactId>
  <version>0.0.1-SNAPSHOT</version>

<other part is removed>

eclipse 在项目标签的0.0.xsd">处显示红色标记。在构建项目时 eclipse 给出如下错误

Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'SpringWeb'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5

我没有得到什么是错误。pom.xml 文件是否配置正确。我在互联网上检查了配置是正确的。

4

1 回答 1

1

您提供的信息很少,至少可以在 pom.xml 中查看您的 Maven 资源插件配置

但一般来说,您可能正在使用一些代理,并且在下载插件 jar 时,您收到了 HTML 格式的 HTTP 错误响应,该响应已保存为您的 repo 中的 jar。

尝试手动从 repo 中删除 jar 并再次运行构建。

于 2013-09-27T07:23:41.037 回答