This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
They do about the same thing. I have seen elsewhere that #2 is preferred. I also saw elsewhere that #1 was out of favor - I had expected it to be marked as deprecated when I went to the docs, but it wasn't. So I guess the real answer is: which are you more comfortable with? Do that one. Me, I would use #2 mainly because I would not think of working with a Maven project in Eclipse without m2e.