Learn Maven Lifecycle Phases in 7 min(with CheatSheet Download)

Pramod Dutta
3 min readJul 30, 2020

Hey BugHunters, In this video we are going to discuss Maven Lifecycle Tutorial, What is Maven, Maven Goals, Phases in depth.

πŸ”₯ Download Maven CheatSheet β€” https://scrolltest.com/ra/day11

βœ… What is Maven?

Maven is a build automation tool used primarily for Java projects. Maven can also be used to build and manage projects written in C#, Ruby, Scala, and other languages.

βœ… What is Maven Build Lifecycle?

  • validate β€” validate the project is correct and all necessary information is available
  • compile β€” compile the source code of the project
    test β€” test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
  • package β€” take the compiled code and package it in its distributable format, such as a JAR.
  • verify β€” run any checks on results of integration tests to ensure quality criteria are met
  • install β€” install the package into the local repository, for use as a dependency in other projects locally
  • deploy β€” done in the build environment, copies the final package to the remote repository for sharing with other developers and projects.

βœ… What is Maven Build Goals

A build phase is made up of a set of goals. Maven goals represent a specific task that contributes to the building and managing of a project.

Sometimes, a maven goal is not bound to a build phase. We can execute these goals through the command line.

The syntax to execute a goal is:

mvn plugin-prefix:goal
mvn plugin-group-id:plugin-artifact-id[:plugin-version]:goal
//Here is an example to execute the dependency tree goal from the //command line. It’s not part of any build phases.
mvn dependency:tree

πŸ”₯ Download the following dependencies to Maven Pom
https://scrolltest.com/ra/day10

api #apitesting #restassured #rest #restapi #restassuredtutorial

P.S:
This is Day 10 of the 30 days of API Testing challenge Series. Where will learn the Basics before jumping to API Automation.

πŸš€ All 30 Days Task β€” https://scrolltest.com/30days/restassured
πŸ“Œ Join 30 Days Challenge Updates β€” https://scrolltest.com/tta
πŸŽ“ Free Automation MasterClass β€” https://thetestingacademy.com
πŸ“š REST API testing with Python β€” https://masterapitesting.com

βœ… What is Maven?
Maven is a build automation tool used primarily for Java projects. Maven can also be used to build and manage projects written in C#, Ruby, Scala, and other languages.

βœ… What is Maven Build Lifecycle?

  • validate β€” validate the project is correct and all necessary information is available
  • compile β€” compile the source code of the project
    test β€” test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
  • package β€” take the compiled code and package it in its distributable format, such as a JAR.
  • verify β€” run any checks on results of integration tests to ensure quality criteria are met
  • install β€” install the package into the local repository, for use as a dependency in other projects locally
  • deploy β€” done in the build environment, copies the final package to the remote repository for sharing with other developers and projects.

βœ… What is Maven Build Goals
A build phase is made up of a set of goals. Maven goals represent a specific task that contributes to the building and managing of a project.

Sometimes, a maven goal is not bound to a build phase. We can execute these goals through the command line.

The syntax to execute a goal is:
$ mvn plugin-prefix:goal
$ mvn plugin-group-id:plugin-artifact-id[:plugin-version]:goal
Here is an example to execute the dependency tree goal from the command line. It’s not part of any build phases.

mvn dependency:tree

πŸ”₯ Download the following dependencies to Maven Pom
https://scrolltest.com/ra/day10

api #apitesting #restassured #rest #restapi #restassuredtutorial

P.S:
This is Day 10 of the 30 days of API Testing challenge Series. Where will learn the Basics before jumping to API Automation.

πŸš€ All 30 Days Task β€” https://scrolltest.com/30days/restassured
πŸ“Œ Join 30 Days Challenge Updates β€” https://scrolltest.com/tta
πŸŽ“ Free Automation MasterClass β€” https://thetestingacademy.com
πŸ“š REST API testing with Python β€” https://masterapitesting.com

--

--