Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

Here's the error I was getting initially:

Failure to transfer org.sonatype.oss:oss-parent:pom:9 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.sonatype.oss:oss-parent:pom:9 from/to central (http://repo.maven.apache.org/maven2): Address family not supported by protocol family: connect

I didn't need to introduce any additional maven plugins, simply enclosing the existing plugins inside <pluginManagement> tag as described here: How to solve "Plugin execution not covered by lifecycle configuration" for Spring Data Maven Builds solved it for me - hopefully it will help someone else as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top