Thursday 25 November 2010

Maven manages project dependencies

I'm pleased with Maven today.

My product uses apache common-net jar. I wanted to make some changes in the common-net source for some testing purpose. So I took the source from internet. Common-net is built using maven. I could make it out by the presence of pom.xml and I understood that this is going to reduce my work effectively.

What I did is -
1) I took the source code and at the same location I ran the following -
mvn eclipse:eclipse

This creates eclipse project setting files.

2) I created eclipse project on the same common-net source code location and modified the class I wanted to and ran the build by typing -
mvn clean install

It created the new jar in the target folder.

How easy it is to manage project dependecies with maven! Otherwise I'd have had to download all the dependencies manually. Thanks maven :)

No comments: