我已经在没有eclipse的情况下在本地设置了Maven项目,它已成功完成.现在我已经下载了Eclipse indgo 3.7.0.由于Eclipse-indigo正在使用m2e(maven 2 eclipse)插件
Eclipse-> help->安装新软件 - >使用(Indigo - http://download.eclipse.org/releases/indigo) - >通用工具 - > m2e(检查)并安装.
在eclipse中将项目添加为maven项目,但是在运行pom.xml文件时出现错误:
Downloading: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.625s
[INFO] Finished at: Thu Sep 15 12:33:01 CEST 2011
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from/to ibiblio.org (http://mirrors.ibiblio.org/pub/mirrors/maven2): null to http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom: UnresolvedAddressException -> [Help 1]
[ERROR]
Run Code Online (Sandbox Code Playgroud)
这是m2e插件问题,我该如何解决这个错误?
将exsisting maven项目导入eclipse时也会出现以下错误:
Could not calculate build plan
Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.1 or one of its dependencies
could not be resolved: Transfer error: null
org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.1
from the specified remote repositories:
ibiblio.org (http://mirrors.ibiblio.org/pub/mirrors/maven2, releases=true, snapshots=false)
Description Resource Path Location Type
Could not calculate build plan: Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3
from http://mirrors.ibiblio.org/pub/mirrors/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of ibiblio.org has elapsed or
updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from/to ibiblio.org
(http://mirrors.ibiblio.org/pub/mirrors/maven2): null to http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-
plugin-2.4.3.pom my-app Unknown Maven Problem
Run Code Online (Sandbox Code Playgroud)
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>com.test.myapp</groupId>
<artifactId>my-app</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>my-app</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
Run Code Online (Sandbox Code Playgroud)
检查org/apache/maven/plugins/maven-resources-plugin/本地存储库下的sha1校验和,maven-resources-plugin如果有任何错误,请删除该目录.或者只是删除目录并让maven再次下载.
| 归档时间: |
|
| 查看次数: |
35400 次 |
| 最近记录: |