Maven Introduction

Apache Maven is a software project management and comprehension tool.
Based on the concept of a project object model (POM),
Maven can manage a project’s build,reporting and documentation from a central piece of information.

Advantage of Maven


1.Maven lets you get your package dependencies easily
2.Maven forces you to have a standard directory structure


Figuring out dependencies for small projects is not hard.
But once you start dealing with a dependency tree with hundreds of dependencies, things can easily get out of hand.


Maven helps to manage


– Builds
– Documentation
– Reporing,
– SCMs,
– Releases
– Distribution

maven repository is a directory of packaged JAR file with pom.xml file.
Maven searches for dependencies in the repositories
.


Reference

https://maven.apache.org/

Installing Apache Maven

Download maven from
http://maven.apache.org/download.html



Extract zip file where you want to install maven



setting up Environment variable for Maven in windows


Make sure JDK is intalled and JAVA_HOME is set to the location of your JDK


Create M2_HOME and MAVEN_HOME variable and give path of your maven folder
M2_HOME

MAVEN_HOME

Update PATH variable


append Maven bin folder – %M2_HOME%\bin, so that you can run the Maven’s command everywhere.

Run “mvn –version” into cmd to verify that it is correctly installed