In the land of blind the one-eyed man is the king

A friend told me, It doesn’t apply anymore in this time. The world as he explained behaves more like “In the land of blind the one-eyed man is the freak”. I appreciate his thoughts.

Error creating simplest maven project

Executed the below:

Creating a new maven project

But received the below:

Error created by maven while trying to create a maven project which have no archetype in the local maven repository

Navigate to below:

http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/1.1/maven-archetype-quickstart-1.1.jar

it will ask if you where to save the jar. Save it in C drive.
Go to cmd.exe and paste the below:

mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-quickstart -Dversion=RELEASE -Dpackaging=jar -Dfile=C:/maven-archetype-quickstart-1.1.jar

E.g. Below is the full output of execution of the above.
Installing archetype to local maven repository

The above means that we can do below now with success.
Creating a new maven project

The expected result is as below:

Create simplest maven project

There are 2 ways to do that:

Way no 1:

1.       Copy and paste the below line in the cmd.exe and execute.

mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=
com.wordpress.happilyblogging -DartifactId=my_first_project 

2. E.g

3. -DgroupId and -DartifactId can be changed as wanted. For this doc I have used “com.wordpress.happilyblogging” as -DgroupId and “my_first_project” as my -DartifactId.

4. Step 2. Should create a project in windows directory: C:\Documents and Settings\GreenHorn\My Documents\Projects

5. But !! on step 2. If you get something like below image the follow this link: Error creating simplest maven project
maven error while installing artifact

6. Else you don’t get something similar to step 4. Then we are done with creating simplest maven project.

NOTE:
Windows xp sp 3 used.