Maven POM XML structure Part 01

Folks,

Below are the essential elements of any maven POM.xml file which can be helpful to understand.

POM stands for : Project object model not Page object model (This is essential interview question many times candidate stumbled upon on this)

Step 1:

Default maven POM.xml


  4.0.0
  com.test.qa [com.test.qa comes from your maven project which ever is set]
  ArtifactID [ArtifactID comes from your maven project which ever is set]
  0.0.1-SNAPSHOT

Step 2:

Add the proper dependencies to it so that it can fetch the libraries centrally


  4.0.0
  com.test.qa
  ArtifactID
  0.0.1-SNAPSHOT

<dependencies>
<dependency>
    org.seleniumhq.selenium
    selenium-server
    3.141.59


<dependency>
    org.testng
    testng
    7.0.0
    test
</dependency>
  </dependencies>



Here add the dependencies from maven central website by easily searching the plugins and add it under tag.

Step 3:

Add required plugins to POM.xml


Hope it helps to understand

Coming soon...




Comments

Popular Posts