Categories





04-What is the pom.xml?

In our last tutorial, we left off with a newly created project in our IntelliJ IDE. With the help of Maven, we received a well-structured project and a pom.xml file for us to further modify and enhance.

The pom.xml file is a file that Maven uses to gather our dependencies. Here is how it is described on the actual Maven website:

A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details used by Maven to build the project. It contains default values for most projects.

Here is the file once again. (Click to enlarge.)

To incorporate additional features and dependencies into our project, you can simply continue to add additional dependencies to the pom.xml file. By visiting a Maven repository such asĀ mvnrepository.com, you can find the latest versions of various dependencies along with the required syntax for adding it into your project. Compared to the initial file above, the below example contains additional dependencies that I want incorporated into my automation framework:

You will notice that as soon as a dependency is added, Maven downloads the required files and incorporates the libraries into your project.