Managing dependencies using Maven
by, 11-05-2011 at 06:42 PM (771 Views)
Maven can manage all jar file dependencies for the build machines. Let me explain how to do this.
We use dependency element to refer to a jar file which reside in a remote repository. It is said that in near future, the dependencies will extend beyond jar files. Maven places the jar files (fetched from remote repository) on the local repository. The element has three child elements, , , and . Maven looks in the remote repository for a directory with the same name as the . Under that directory, it looks for a jars subdirectory. Inside the jars directory should be a jar file that has the filename id-version.jar. In the given example, the defined first dependency will look for ant-1.4.1.jar in the remote repository. The url element is used for documentation only.</id></url></version></id></dependency>