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
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
Solution #2:
For any other issues delete maven local repository and run mvn:install again.
Worked for me. Thanks,
Thanks a lot it solved my problemm by removing the repository
It’s very good and works for me. Thanks very much.
Thanks my friend, it works for me…! Saludos…
Thanks it worked for me. Don’t forget to restart the Eclipse!!!
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
Thanks worked for me , by deleting repository folder.
Thanks it work, Wonderful
Thanks a lot. really worth reading
what should i give in the name of proxy and which port.?
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
Thanks a lot..It helped me
I tried all above solution still not working for me.