could-not-resolve-archetype-org-apache-maven-archetypesmaven-archetype

could-not-resolve-archetype-org-apache-maven-archetypesmaven-archetype

OR
Create Maven project Eclipse complains
OR
Create a Maven project in Eclipse complains “Could not resolve archetype”

OR if you get below exception:

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (C:\Users\username\.m2\repository)
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (C:\Users\username\.m2\repository)

 

If you get above error when try to create maven project in eclipse. It’s proxy issue and due to proxy it blocks archetype. Please follow below steps:

  • Go to your Maven installation folder C:\apache-maven-3.1.0\conf\ ( For example: here we have installed maven in c:\ drive)
  • Copy settings.xml to C:\Users\[UserFolder]\.m2 (Your local repository)
  • Modify the proxy in settings.xml based on the info that you get from the above link.
<proxy>
          <active>true</active>
          <protocol>http</protocol>
          <host>your proxy</host>
          <port>your port</port>
        </proxy>

 

Note: If you are not sure how to find proxy sever name which your local system is using: Please use this post

  • Open eclipse
  • Go to: Windows > Preferences > Maven > User Settings
  • Browse the settings.xml from .m2 folder
  • Click Update Settings
  • Click Reindex
  • Apply the changes and Click OK

could-not-resolve-archetype-org-apache-maven-archetypesmaven-archetype

 

Issue should be resolved after setting above. 

If above solution not worked then try below:

  • Go to your local .m2 folder that should be C:\Users\[UserFolder]\.m2 or search based on your user
  • Delete folder name repository manually
  • Now open eclipse again
  • Go to: Windows > Preferences > Maven > User Settings
  • Click Update Settings
  • Click Reindex
  • Apply the changes and Click OK
  • This will create repository again refresh your eclipse and try again
  • This should resolve the issue.

Below are some other solution if still not works try below:

Solution #1:

Please see if your network is using proxy then change proxy in settings.xml file:

Find proxy name in Internet explorer:

  • To find proxy host name go to IE -> tools -> connection -> LAN settings -> advanced-> HTTP

could-not-resolve-archetype-org-apache-maven-archetypesmaven-archetype

could-not-resolve-archetype-org-apache-maven-archetypesmaven-archetype

could-not-resolve-archetype-org-apache-maven-archetypesmaven-archetype

Solution #2:

For any other issues delete maven local repository and run mvn:install again.

13 thoughts on “could-not-resolve-archetype-org-apache-maven-archetypesmaven-archetype”
  1. No need to delete whole repository folder. Only rename org/apache/maven folder and then update and reindex in eclipse. It will create new maven folder with webapp archetype

  2. I have read everything on every post and I still cannot get this to work 🙁 is anyone able to help at all? Thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *