Building a java software project typically includes some activities as follows:
Manually performing all these tasks is time-consuming and is prone to errors. Therefore, we take the help of a build tool. A build tool is a tool that automates everything related to building a software project, from compiling to deploying.
There are other build tools that are available for building Java projects such as Gradle and Ant. We are going to use Maven as our build tool. Let's take a look at how we can install Maven:
.zip
file into a convenient directory of your choice.M2_HOME
in a way that is similar to the way in which we created JAVA_HOME
. Enter the extracted Maven zip directory's path as the value for the M2_HOME
environment variable.M2_HOME
variable to the PATH
environment variable as well. Double-click on the path variable and click on the New button to enter %M2_HOME%in
as the value.mvn -version
and press Enter; you will see the following details of the Maven version:C:UsersAmuthan>mvn -version Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T10:41:47-06:00) Maven home: C:Program Filesapache-maven-3.3.9 Java version: 1.8.0_91, vendor: Oracle Corporation Java home: C:Program FilesJavajdk1.8.0_91jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"