0

When I create a new maven project from eclipse, I am getting the following error

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5

This is the error I see in the pom.xml

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): Access denied to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.pom. Error code 403, Forbidden

I am using:-

Eclipse IDE for Java EE Developers 2.0.1.20130919-0803-Kepler
Maven version: apache-maven-3.2.1

I am inside company network, I have configured proxy settings in settings.xml

Mustafa sabir
  • 4,130
  • 1
  • 19
  • 28
skumar
  • 180
  • 3
  • 17

1 Answers1

0

Browsing the directory at http://repo.maven.apache.org/maven2 has been disabled. You can access the address in your browser and you will get an according message:

Browsing for this directory has been disabled.

View this directory's contents on http://search.maven.org instead.

Find out more about The Central Repository.

To overcome this problem, you can pass a custom location for the archetype catalog file to maven:

mvn archetype:generate -DarchetypeCatalog=http://search.maven.org/remotecontent?filepath=archetype-catalog.xml

Or you can download the catalog file and put it in your local .m2 directory, I suppose.

If you are using Eclipse, go to Preferences -> Maven -> Archetypes and click on Add Remote Catalog.... Then enter http://search.maven.org/remotecontent?filepath=archetype-catalog.xml as Catalog File.

Community
  • 1
  • 1
user1438038
  • 5,821
  • 6
  • 60
  • 94
  • :Thanks for your answers, none of them worked for me. *"there are two versions (2.5 and 2.6) of plugin under .m2/repository/org/apache/maven/plugins/maven-resources-plugin/ i removed 2.5 version then it worked for me"* - This worked for me – skumar May 15 '15 at 09:25