首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >m2e Eclipse indigo出现错误

m2e Eclipse indigo出现错误
EN

Stack Overflow用户
提问于 2011-09-15 20:19:01
回答 3查看 35.5K关注 0票数 10

我已经在没有eclipse的情况下在本地安装了Maven项目,它成功地完成了。现在我已经下载了Eclipse indgo 3.7.0。由于Eclipse-indigo使用了m2e(Maven2eclipse)插件,因此通过以下方式启用了它

Eclipse->帮助->安装新软件->使用(Indigo-http://download.eclipse.org/releases/indigo)->通用工具->M2E(检查)并安装。

在eclipse中添加项目作为maven项目,但我在运行pom.xml文件时遇到错误:

代码语言:javascript
复制
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] 

这是m2e插件的问题,我如何解决这个错误?

在将现有的maven项目导入到eclipse时,也会出现以下错误:

代码语言:javascript
复制
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:

代码语言:javascript
复制
 <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>
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2011-09-19 20:08:09

已解决问题,问题是因为在组织中工作(在组织中启用了代理),并且在maven in 5 min not working提供的settings.xml中启用了代理

票数 2
EN

Stack Overflow用户

发布于 2011-09-17 17:39:27

检查本地存储库下org/apache/maven/plugins/maven-resources-plugin/中的sha1校验和,如果有错误,请删除maven-resources-plugin目录。或者直接删除目录,让maven重新下载。

票数 5
EN

Stack Overflow用户

发布于 2011-09-16 00:33:05

Eclipse有一个内置的Maven实现。尝试使用与Eclipse相同的Maven版本从命令行编译项目,或者在Eclipse中设置Maven安装(窗口/首选项/ Maven /安装)。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7430682

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档