What is Maven ? How can we configure maven in Windows operating system and set the environment variable?
What is Maven ?
Maven is a build automation tool used primarily for Java projects for dependency management. Maven can also be used to build and manage projects written in C#, Ruby, Scala, and other languages. The Maven project is hosted by the Apache Software Foundation, where it was formerly part of the Jakarta Project.
Pre-requisite
Java should be already present in the system and environment variable should be set for java. Refer screenshot
Checking whether maven is already configured in system
Before configuring it is a good practice to check whether maven is already configured in the system. To do that follow the steps:
Search for cmd in windows search bar and click on command prompt. This will open command prompt window in the system.
Setting up maven in windows
Open any browser say google chrome and search for apache maven download in search bar and hit enter.
Click on Download Apache Maven link
After that click on the link as shown in the below screenshot from Files section
Extract the zip file and will get a folder like one in the below screenshot
Copy the folder in any drive of your choice. In this blog, I am copying the folder in C:\Program Files. Refer the below screenshot
Now it is time to set maven in the environment variables. Search for environment variables in windows search bar and click on open. Refer the below screenshot
Click on Environment Variables . Refer below screenshot
Now open a new command prompt window and execute mvn -v or mvn --version and will display the maven configuration details. Refer the screenshot
Comments
Post a Comment