When I first setting up Maven, I use to write XML code. To be frank, I don't really like this work because it took me a lot of effort to figure out the coordinate. To me, this is so much annoying. I don't care, just give me the latest version will do.
Thus I pass this job to Eclipse. BTW, I am just Linux version of Juno Eclipse in Fedora 17, there might be some different with previous version because I found out that the plugins tab in my Eclipse was missing, not really sure does it happen to previous version as well. My previous experience with Maven is editing the POM file without going through the UI, please forgive me on the laziness to find out the truth.
Lets move on. When open up the POM file, there is a dependencies tab. Clink on that there is a Add button in it. Click on that will bring up a dialog just shown as the picture below:
This is the greatest part of using Maven in Eclipse. Once done editing on the POM file, save it, and Eclipse will trigger the download. This was amazing!!
Anyhow, I still need to update the build path although Eclipse have done the download. Don't get me wrong, I am not require to configure the project build path. I just type this command:
mvn eclipse:eclipse -Dwtpversion=2.0
Go to Eclipse, right click on the project > Maven > Update Project, and then say "I am Done!".
No comments:
Post a Comment