Using Maven versions earlier than 2.0.9
If you are building behind a HTTP proxy, you will need to use Maven 2.0.5 or newer as there is a well known bug fetching artifacts from a https:// repository via a HTTP proxy with Maven 2.0.4.
Due to MNG-2261 which causes problems locating plugins when you are in a directory with no pom.xml, an additional step is necessary for Maven versions earlier than 2.0.9 to have Maven download the necessary tools for you.
Create an empty directory, download this pom.xml in there, and run "mvn package". This bootstrap pom trick will download a bunch of artifacts into your local repository.
Also, if your Maven has trouble resolving artifacts, consider adding the following entries to your
~/.m2/settings.xml too. This is a crude way to cause Maven to look at the right m2 repository all the time for artifact resolutions.