DevOps : Maven introduction

Share via:


“Maven is a project management tool which encompasses a project object model, a set of standards, a project lifecycle, a dependency management system, and logic for executing plugin goals at defined phases in a lifecycle”


Maven is a build tool based on JAVA Files.


Main Features:

  • Build-tool
  • Dependencies management tool
  • Documentation tool

Maven Life Cycle:


  • Generate Resources
  • Compile
  • Test
  • Package
  • Install
  • Deploy


  • Generate Resources :
  • Compile: It is a phase where it will compile all java files will be converted to object files.
  • Test: Maven will try to do Unit Test i.e., a particular test what developer does to check if the code is running fine.
    During test it will create a “test.Java” file and the compiles to “test.class” file then the test is done.
  • Package: Is a assembly step where it create a deliverable file.
    e., Jar,war,ear files.
  • Install : It will take a copy of project output & copies into the local repository.
  • Deploy : Taking the deliverable of a project and put into some particular location.



Environmental Variables:

Before using maven there has to be few environmental Variables that has to be set, which can be seen in below picture.





  • We will have all the source file related to project in POM.XML.
  • Anything that we are going to specify in Maven will be provided through Goals.
    these goals will invoke a plugin, then the plugin will run the task.
  • Each and maven project should have a minimum of one POM.XML.
  • XML should have
    • G – Group ID
    • A – Artifact ID
    • V – Version ID
  • Source Code location
  • Specify certain plugin used in project
  • Dependencies
  • Xml should always begin with tag <project> and end with </project>
  • There are two types of plugins:
    • Build Plugin : using which we will do build activity (ex : install)
    • Reporting Plugin: Any plugin used to generate reports (ex: Site)


Default POM.XML:


Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates

KTEXPERTS is always active on below social media platforms.


Facebook :
LinkedIn   :
Twitter     :
YouTube :
Instagram :

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (28 votes, average: 4.89 out of 5)

13 thoughts on “DevOps : Maven introduction

Add Comment