TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • TestNG
  • Tools
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Apache Maven

Setting up MAVEN_HOME on Windows 10

Maven

Overview

In this tutorial, Let’s setup Maven on Windows 10 operating system. Maven depends on JDK. So, just make sure you have JDK installed on your computer. Setup involves like download, extract contents, and setting up the MAVEN_HOME environment variable.

Download Maven

Navigate to: https://maven.apache.org/download.cgi

Download the zip archive : apache-maven-<version>-bin.zip

Extract the contents

Save the file on your computer.

Extract the contents to a favorable directory using 7zip or a similar utility.

(https://www.testingdocs.com/questions/how-to-download-and-install-7-zip-utility-tool/)

For example to c:\maven

Set MAVEN_HOME

MAVEN_HOME is an environment variable that should point to the install directory of the Maven tool setup. Some inbuilt scripts use this variable. It’s important to set up this variable for the smooth running of the Maven tool.

Ask Cortana or key in “Edit the system environment variables” in the search bar.

 

 

In the Advanced Tab >> Click on the Environment Variables… button.

 

 

New Variable

Click on the New… button to create a new environment variable. Add a MAVEN_HOME variable and point it to c:maven directory. Click on the OK button.

Now add the Maven bin folder to the PATH variable.

Select the Path variable in the user variables. Click on the Edit… button

Click on New and add %MAVEN_HOME%\bin  to the PATH. Click on the OK button.

Verify the setup

You can try a bunch of commands to verify the setup. To verify the maven setup, launch command shell, and type

mvn -version

You should see the version information.

C:>mvn -version
C:
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 
2017-04-04T01:09:06+05:30) Maven home: C:\maven\bin\.. Java version: 1.8.0_191, vendor: Oracle Corporation Java home: C:Program FilesJavajdk1.8.0_191jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "x86", family: "windows"

 

To know that the MAVEN_HOME is set, issue the following command in the command prompt:

c:> echo %MAVEN_HOME%

The output should display the maven folder path. We have setup MAVEN_HOME and added it to the PATH variable so that you can work from any directory path irrespective of the maven setup.

 

Maven Tutorials on this website can be found at:
https://www.testingdocs.com/apache-maven-tutorial/

For more details on the Apache Maven, visit the official website at:
https://maven.apache.org/

Related Posts

Maven Download Verification Win11

Apache Maven /

Download Maven on Windows 11

Invalid Target Java Error

Apache Maven /

Fix Fatal Error compiling: Invalid target release in Maven Project

Maven Project from archetype

Apache Maven /

Create Maven Project from Archetype using NetBeans IDE

Create New Project

Apache Maven /

Create a Maven Project skip archetype

Maven Download Button

Apache Maven /

Install Maven on Ubuntu Linux

‹ Maven Surefire Plugin Jenkins› How to fix Maven error No goals specified

Recent Posts

  • Antivirus Products for Windows 11 PC
  • Install CodeBlocks IDE on Windows 11
  • Location Privacy Settings on Windows
  • Windows 11 Virus & Threat Protection
  • Download & Install Python on Windows 11
  • Cumulative Update for Windows 11 Version
  • Test execution speed in Selenium IDE
  • Check Windows 11 Free Upgrade
  • Download IntelliJ IDE on Windows 11
  • New MySQL Connection in Workbench

Back to Top

Automation Tutorials

  • JBehave Tutorial
  • Selenium Tutorial
  • TestNG Tutorial
  • JUnit Tutorial

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version