Tuesday, October 27, 2015

could not resolve archetype org.apache.maven.archetypes maven-archetype-quickstart


INTRODUCTION

This post will help you to resolve the error which will occur during the creation of Project using Maven.
Error
could not resolve archetype org.apache.maven.archetypes maven-archetype-quickstart

ENVIRONMENT VARIABLES SETTINGS

Add the below environment variables.
  1. MAVEN_HOME=c:\maven-3.3.3
  2. M2_HOME==c:\maven-3.3.3
  3. CLASSPATH = %MAVEN_HOME%\lib;
  4. PATH=%MAVEN_HOME%\bin;

PROXY SETTINGS

Set this if you are connected with any vpn.
  1. Go to c:\maven-3.3.3\conf\settings.xml
  2. Add Your proxy details
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>www.myweb.com</host>
<port>80</port>
</proxy>

ECLIPSE SETTINGS

  1. Open Run Command and type . (just dot), you will be directed to your local user path like c:\Users\<username>
  2. Delete .m2 folder permanently
  3. Open Eclipse
  4. Go to Windows->Preferences->Maven->User Settings
    1. Global Settings: c:\maven-3.3.3\conf\settings.xml
    2. User Settings: c:\maven-3.3.3\conf\settings.xml
  5. Click Update Settings & Reindex
  6. Restart the Eclipse
Now try to create a Maven Eclipse and Maven Project will be created successfully. Please reply your comments if you still facing any error.

No comments :

Post a Comment