I installed maven on my OS X machine via Macports just like you’re supposed to. I went to the Maven in 5 Minutes tutorial and copy-and-pasted the sample command lines verbatim into my terminal prompt. It seemed so easy that there was no way it could fail, but of course I knew it would because these things always do. The
mvn archetype: command generated a few screenfuls of errors that ended in Java stack traces that I of course could not make heads or tails of. Googling turned up long discussions about proxy servers fouling things up, which lead to a flurry of
tracerouting on my part, even though this seemed not to be the issue because I could load the .POM files in my browser. Finally I ran with the
-X debugging switch, which gave a helpful message about not being able to write files.
The problem was that the
/User/username/.m2 directory to which Maven installs various configuration files was owned by root, presumably because you have to run MacPorts installs as root. I used
chown to take ownership of the
.m2 directory, and then everything was fine. So it took me a little longer than 5½ minutes to get through this tutorial, but hopefully forewarned with the preceding information it will take you less.