top of page

POM & Dependencies In Maven

What Is POM In Maven ?

Project Object Model abbreviated as 'POM' is a XML format file that contains details about project configurations and operations which are read by Maven to build a project.

It is a key to operate Maven.For most of the projects it contains default values.

Some specified configuration information Maven contains are dependencies,plugins,goals and so on, to build a project.

Here's a sample of pom.xml file :

<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">

    <!-- Add Dependencies-->

Elements used in pom.xml :


It is a root element of pom.xml file.


modelVersion refers the version of POM model that is being used in the project.Use modelVersion 4.0.0 for maven 2 and maven 3.


It is the id of the project group that would be unique.In above example I've given groupId as 'org.example' .


It is used to give name of the project you are building.E.g. 'MavenTestProject' .


This element contains the version number of of the project/libraries.


This element contains a complete list of defined dependency of project.


It defines dependency by using description of groupId,artifactId and version of required library.


It defines the scope for the maven project that can be compile,test,runtime and so on.

Dependencies in Maven

Dependencies are the external Java libraries required for project that adds the required library from the repositories.

If the dependencies are not found in local repository,Maven downloads them from a central repository and keeps them in local repository.

Refer next page Creating A New Maven Project In Eclipse

bottom of page