'BUILD ERROR The plugin 'org.apache.maven.plugins:maven-eclipse-plugin' does not exist or no valid version could be found

Searching repository for plugin with prefix: 'eclipse'.
 org.apache.maven.plugins: checking for updates from central
NG] repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file: Connection timed out: connect
 Repository 'central' will be blacklisted

 ------------------------------------------------------------------------
] BUILD ERROR
 ------------------------------------------------------------------------
 The plugin 'org.apache.maven.plugins:maven-eclipse-plugin' does not exist or no valid version could be found
 ------------------------------------------------------------------------
 For more information, run Maven with the -e switch
 ------------------------------------------------------------------------
 Total time: 22 seconds
 Finished at: Fri Aug 26 17:42:01 IST 2011
 Final Memory: 3M/15M


Solution 1:[1]

This problem is likely due to a possibly temporary network problem. While we're at it, if you plan to use Maven together with Eclipse do not use maven-eclipse-plugin but rather the m2e/m2eclipse Eclipse plugin. Which one depends on which version of Eclipse you are using; m2e is the one that's actively developed, but only works with 3.7 (Indigo), m2eclipse is the legacy version that works with 3.6 (Helios).

Solution 2:[2]

There could be a few reasons for this:

  • a network problem as Nicola mentioned earlier

If the plugin actually exists in the Maven repository, then

  • the repository could have been created with a different version of Maven
  • sometime the repository files get corrupted and a solution could be to run maven with -U switch
  • if previous solution doesn't work, try deleting the entire repository and let Maven re-download all the files

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nicola Musatti
Solution 2 Adrian Ber