Eclipse中的Pom错误(Pom error in Eclipse)

编程入门 行业动态 更新时间:2024-10-11 19:24:23
Eclipse中的Pom错误(Pom error in Eclipse)

我在Eclipse中有一个Maven项目,如果我尝试运行Maven > Update project我会收到以下错误

无法转移org.apache.maven.plugins:来自http://repo.maven.apache.org/maven2的 maven-resources-plugin:pom:2.5被缓存在本地存储库中,在更新间隔之前不会重新尝试解析中心已经过去或强制更新。 原始错误:无法传输工件org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from / to central( http://repo.maven.apache.org/maven2 ):java.net.ConnectException:连接超时到http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.pom

我尝试使用嵌入式安装和外部安装运行Maven,结果相同。 我没有在Eclipse中设置任何代理,我也不需要。 我没有在我的POM中引用该插件。 运行mvn eclipse:eclipse控制台中的mvn eclipse:eclipse运行完美。 我正在使用Eclipse Kepler和m2e 1.4.0.201。

父母POM是

<parent> <groupId>org.sonatype.oss</groupId> <artifactId>oss-parent</artifactId> <version>7</version> </parent>

任何人都知道为什么?

I have a Maven project in Eclipse and if I try to run Maven > Update project I get the following error

Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.5 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.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): java.net.ConnectException: connection timed out to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.pom

I tried to run Maven with the embedded installation and an external one - same result. I don't have any proxy set up in Eclipse and I don't need one. I do not reference the plugin in my POM. Running mvn eclipse:eclipse in console works perfectly. I'm using Eclipse Kepler and m2e 1.4.0.201.

The parent POM is

<parent> <groupId>org.sonatype.oss</groupId> <artifactId>oss-parent</artifactId> <version>7</version> </parent>

Anyone have any idea why?

最满意答案

添加

<pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> </plugin> </plugins> </pluginManagement>

解决了这个问题。

Adding

<pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> </plugin> </plugins> </pluginManagement>

solved the problem.

更多推荐

本文发布于:2023-07-27 03:56:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1284830.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   Eclipse   Pom   error

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!