What is the use of pom.xml in Maven?

POM is an XML file that contains the project configuration details used by Maven. It provides all the configurations required for a project.

POM means Project Object Model, and, as the name suggests, it defines the model of the project as well.

In the normal project development you will add JAR files and libraries as required. In Maven-based development, those JAR files, libraries are added to the project using this pom.xml. In the pom context we call those JAR files, libraries as dependencies.


In short the pom.xml will have all information to build your project.

For example you want to build a project and you have only the pom.xml sent to you via mail. If there are enough entries in the pom.xml then that is all you need! You can import it to Eclipse, Maven will download your source code from CVS, download various dependency jars (like Spring, Apache Commons), run your test cases, build the jar/war, deploy to your jboss/app server, generate a report of your code quality (using Sonar, maybe). Each task you want to do will be mentioned as a goal.

The links already provided are good enough for reference.