First install Maven. For example on Ubuntu 9.10 :
sudo apt-get install maven2
Then we will create the directory $HOME/.m2 :
mvn archetype:create -DgroupId=be.peopleware.training.maven -DartifactId=helloWorld
=> It will create .m2 automaticaly.
Note : Perhaps you can do by hand but I've not tested.You have certainly to check rights.
Note : It could be long and it will make an error but it will create the .m2 directory.
After that you had to create settings.xml in the .m2 directory like that :
To resume, you have a .m2 directory similar to that :
Then go on your workspace directory (ex :$HOME/workspace) and launch the following command : mvn archetype:create -DgroupId=be.peopleware.training.maven -DartifactId=helloWorld