Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pom error in Eclipse

Tags:

eclipse

maven

m2e

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?

like image 327
Adrian Ber Avatar asked May 25 '26 21:05

Adrian Ber


1 Answers

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.

like image 117
Adrian Ber Avatar answered May 30 '26 03:05

Adrian Ber



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!