MAVEN BUILD TOOL
MEVEN:
Maven is a build tool commonly used in Spring Boot
and other Java projects. It helps simplify the
development process by managing dependencies and
automating tasks like compiling code, running tests, and
packaging the application.
First maven Read the pom file which were in the Pom.xml
Check all the Dependencies which were required for the
Software build.
The root Folder contain all the dependencies,if something is
missing download remotely.
Compile the Source code and Deploy as Jar or War files.
MAVEN LIFE-CYCLE
When we build a Maven project, it executes a set of clearly defined
tasks based on the project pom.xml configuration .
This standard set of tasks creates the maven build lifecycle.
There are three built-in build lifecycles.
default: handles project build and deployment
clean: handles project cleaning
site: handles the creation of project site documentation
DEFAULT:
The default lifecycle handles your project deployment.
CLEAN:
The clean lifecycle handles project cleaning.
SITE:
The site lifecycle handles the creation of your project's web
site.
Default Lifecycle Phase:
Maven build lifecycle goes through a set of stages, they are
called build phases. For example, the default lifecycle is made
up of the following phases.
clean
validate
compile
test
package
verify
install
site
deploy
Phase Handles Description
prepare- resource copying Resource copying can be customized in this
resources phase.
validate Validating the Validates if the project is correct and if all
information necessary information is available.
compile compilation Source code compilation is done in this phase.
Test Testing Tests the compiled source code suitable for
testing framework.
package packaging This phase creates the JAR/WAR package as
mentioned in the packaging in POM.xml.
install installation This phase installs the package in local/remote
maven repository.
Deploy Deploying Copies the final package to the remote repository.
ABOUT MORE :
https://www.tutorialspoint.com/maven/maven_build_life_cy
cle.htm