Maven in 5½ Minutes

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 pinging and 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.

Advertisements
This entry was posted in Those that have just broken the flower vase. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s