I have just downloaded last version of Maven.
And when i am trying to run
mvn archetype:generate
i get error message
it seem to work with maven 2 (reproduced the problem on 3 machines linux and windows with maven 3.05 and maven 3.1)
the problem occurs only for the repo1... urls. If you delete your local repository, all plugin downloads will work fine until the download of archetype catalog - "access denied"
It seems as though directory browsing on http://repo1.maven.org/maven2 has been switched off. I had to resort to getting the archetype catalog myself. I did this:
mvn archetype:generate -DarchetypeCatalog=http://search.maven.org/remotecontent?filepath=archetype-catalog.xml
Alternatively I guess you could just download the archetype-catalog.xml file from that link and place it in your .m2 directory as mentioned in this comment:
http://jira.codehaus.org/browse/ARCHETYPE-202?focusedCommentId=182771&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-182771
It seems like Apache central repository has fixed the issue. So without making any change, the problem is fixed now. Please try once again and let us know in case of any issue.
Execute this Command. It will not only create your maven project but also resolve the issue of downloading archetype jar. It is mainly due to unavailability to the archetype URL.
Fill Project Group Id with your project names.
mvn archetype:generate -DgroupId={Project Group Id} -DartifactId={Project Id} -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false -DarchetypeCatalog=http://search.maven.org/remotecontent?filepath=archetype-catalog.xml