1

click here to see the image i could not create maven project in eclipse IDE. i am getting the error in the image and as well as mentioned below

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

i have tried following:


  1. deleted the folders and files under .m2/repositary and it did not work
  2. windows->preferences->maven->user settings->and pointed the settings.xml to the downloaded apache maven 3.5.2 and it also did not work.
  3. created the settings.xml under .m2/repositary ,it also did not work.

environment variable also set for maven(maven_home and m2_home) and java_home.

i have googled and tried all these but could not resolve this issue.

any help would be appreciated .

Thanks in advance.

1 Answers1

0

First, make sure to use .m2/repository, not .m2/repositary

Check that your settings.xml is correctly set, with at least:

<mirror>
    <id>Central</id>
    <url>http://repo1.maven.org/maven2</url>
    <mirrorOf>central</mirrorOf>
</mirror>

Then check in a CMD (meaning outside) Eclipse, if:

  • M2_HOME and JAVA_HOME are also correctly set there
  • java -version does return the expected version
  • mvn -version does return the expected version
  • you can download the artifact:

For the last point, you actually can execute a mvn command, anywhere you want (no need for a pom.xml)

cd c:\
mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.apache.maven.plugins:maven-resources-plugin:2.6 -U
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250