How to Install Apache Maven on Windows 10

Apache Maven is a build automation tool for Java projects. In this tutorial, we will learn how to install Apache Maven on Windows 10.

Prerequisites

Before we start, we need to install Java on our machine.

  1. Go to the Java SE download page at https://www.oracle.com/java/technologies/javase-downloads.html

  2. Download and Install the latest version of Java Development Kit (JDK) for Windows operating system.

Install Apache Maven on Windows 10

  1. Download Apache Maven from the official Apache Maven website at http://maven.apache.org/download.cgi

  2. Choose the latest binary zip file under the "Files" column.

  3. Unzip the downloaded file to a folder of your choice (e.g. C:\Program Files\Maven)

  4. Create a new environment variable MAVEN_HOME and set it to the folder where you unzipped Apache Maven (e.g. C:\Program Files\Maven\apache-maven-3.8.1)

  5. Add %MAVEN_HOME%\bin to your PATH environment variable:

    • Press the Windows key and search for "Environment Variables".
    • Click on "Edit the system environment variables".
    • Click on "Environment Variables" button.
    • Under System Variables, find the PATH variable and click on "Edit".
    • Add %MAVEN_HOME%\bin at the end of the value.
  6. Verify Maven installation by opening a new command prompt window and running the following command:

mvn -v

If the installation was successful, the output will display the version of Maven installed on your machine.

Conclusion

Congratulations! You have successfully installed Apache Maven on your Windows 10 machine. You can now use Maven to manage dependencies and build Java projects.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!