m2e Eclipse indigo 出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7430682/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
m2e Eclipse indigo gives error
提问by TechFind
I have setup Maven project locally without eclipse, it is completed succefully. Now i have downloaded Eclipse indgo 3.7.0. Since Eclipse-indigo is having m2e(maven 2 eclipse )plugin enabled it by
我在没有eclipse的情况下在本地设置了Maven项目,它成功完成。现在我已经下载了 Eclipse indgo 3.7.0。由于 Eclipse-indigo 启用了 m2e(maven 2 eclipse)plugin
Eclipse->help->install new software->work with(Indigo - http://download.eclipse.org/releases/indigo)->General purpose tools->m2e(check) and install.
Eclipse->帮助->安装新软件->使用(Indigo - http://download.eclipse.org/releases/indigo)- >通用工具->m2e(检查)并安装。
in eclipse added project as as maven project, but i am getting error while running pom.xml file:
在 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]
this is m2e plugin issue, how can i solve this error?
这是 m2e 插件问题,我该如何解决这个错误?
also getting following error while importing exsisting maven project to eclipse:
将现有的 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
POM.xml:
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>
采纳答案by TechFind
solved, issue was since working in an organization( where proxy enabled), enabled proxy in settings.xml as given by maven in 5 min not working
解决了,问题是因为在组织中工作(启用了代理),在 5 分钟内由Maven提供的 settings.xml 中启用了代理 不起作用
回答by palacsint
Check the sha1 checksums in org/apache/maven/plugins/maven-resources-plugin/
under your local repository and delete the maven-resources-plugin
directory if any of them are wrong. Or just delete the directory and let the maven to download it again.
检查org/apache/maven/plugins/maven-resources-plugin/
本地存储库下的 sha1 校验和,maven-resources-plugin
如果其中任何一个错误,则删除该目录。或者干脆删除目录,让maven重新下载。
回答by palacsint
Eclipse has a built-in Maven implementation. Try to compile the project from command line with the same Maven version as Eclipse has or set your Maven installation in Eclipse (Window / Preferences / Maven / Installations).
Eclipse 有一个内置的 Maven 实现。尝试使用与 Eclipse 相同的 Maven 版本从命令行编译项目,或者在 Eclipse 中设置您的 Maven 安装(Window / Preferences / Maven / Installations)。