Most of the time when I work with maven I encounter this error:
Reason: Error getting
POM for 'org.apache.maven.plugins:maven-eclipse-plugin' from
the repository: Failed to resolve artifact, possibly due to a repository list
that is not appropriately equipped for
this artifact's
metadata.
org.apache.maven.plugins:maven-eclipse-plugin:pom:2.9-SNAPSHOT
As it happens with other maven dependencies their pom.xml
file gets somehow modified and the plugin does not work as expected anymore.
The solution here is to navigate to your local repository, delete the dependency and try to download it again. If it still fails (clearly a pom.xml that has not been corrected) then you need to edit the metadata file. In my case:
The solution here is to navigate to your local repository, delete the dependency and try to download it again. If it still fails (clearly a pom.xml that has not been corrected) then you need to edit the metadata file. In my case:
/Users/sridhar/.m2/repository/org/apache/maven/plugins/maven-eclipse-plugin/maven-metadata-central.xml
You will notice the "latest node", for example:
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<versioning>
<latest>2.9-SNAPSHOT</latest>
<release>2.8</release>
<versions>
<version>2.0-beta-1</version>
<version>2.0-beta-2</version>
<version>2.0</version>
<version>2.1</version>
<version>2.2</version>
<version>2.3</version>
<version>2.4</version>
<version>2.5</version>
<version>2.5.1</version>
<version>2.5.2-SNAPSHOT</version>
<version>2.6-SNAPSHOT</version>
<version>2.6</version>
<version>2.6.1-SNAPSHOT</version>
<version>2.7-SNAPSHOT</version>
<version>2.7</version>
<version>2.8-SNAPSHOT</version>
<version>2.8</version>
<version>2.9-SNAPSHOT</version>
</versions>
<lastUpdated>20101028062425</lastUpdated>
</versioning>
</metadata>
Just remove the "latest" node or edit to
reflect the version you want to use and problem solved
No comments:
Post a Comment