To install Apache Maven on Windows, you just need to download the Maven’s zip file, and Unzip it to the directory you wish to install, and configure the Windows environment variables.

Tools Used :

  1. JDK 1.7
  2. Maven 3.2.2
  3. Windows 8

Note
Maven 3.2 requires JDK 1.6 or above, while Maven 3.0/3.1 requires JDK 1.5 or above

1. JDK and JAVA_HOME

Make sure JDK is installed, and “JAVA_HOME” variable is added as Windows environment variable.

2. Download Apache Maven

Visit Maven official website, download the Maven zip file, for example : apache-maven-3.2.2-bin.zip. Unzip it to the folder you want to install Maven.

Assume you unzip to this folder – C:\Program Files\Apache\maven

Note
That’s all, just folders and files, installation is NOT required.

3. Add M2_HOME and MAVEN_HOME

Add both M2_HOME and MAVEN_HOME variables in the Windows environment, and point it to your Maven folder.

M2_HOME or MAVEN_HOME
Maven document said add M2_HOME only, but some programs still reference Maven folder with MAVEN_HOME, so, it’s safer to add both.

4. Add To PATH

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

5. Verification

Done, to verify it, run mvn –version in the command prompt.

C:\Users\mkyong>mvn -version
Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T21:51:42+08:00)
Maven home: C:\Program Files\Apache\maven
Java version: 1.7.0_65, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_65\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "windows"
C:\Users\mkyong>

If you see a similar message, means the Apache Maven is installed successfully on Windows.

How to install Maven on Windows的更多相关文章

  1. maven在windows环境下加载settings.xml文件

    今天发现maven在windows环境下加载的settings.xml文件是c:下的,就算修改conf下的settings.xml里的<localRepository>给他明确指向也没用.

  2. Install MongoDB on Windows (Windows下安装MongoDB)

    Install MongoDB on Windows Overview Use this tutorial to install MongoDB on a Windows systems. PLATF ...

  3. Maven在Windows中的配置以及IDE中的项目创建

    Maven在Windows下的配置 1.Maven下载地址:http://maven.apache.org/download.cgi,下载红框里的版本即可. 2.解压到D盘: 3.修改配置文件sett ...

  4. maven在windows及linux环境下安装

    maven下载 下载地址:https://maven.apache.org/download.cgi maven在windows下安装 解压到D盘 修改配置文件 进入conf,打开settings.x ...

  5. 【Linux】-NO.7.Linux.3.Maven.1.001-【CentOS 7 Install Maven 3.5】-

    1.0.0 Summary Tittle:[Linux]-NO.7.Linux.3.Maven.1.001-[CentOS 7 Install Maven 3.5]- Style:Linux Seri ...

  6. IntelliJ IDEA教程之如何clean或者install Maven项目

    一.前言 Eclipse中如果我们想clean或者install工程,我们只需要右键工程,然后找到run->Maven install 或者run->Maven clean就可以了,但是I ...

  7. Install Terraform on Windows, Linux and Mac OS

    Step-by-step tutorial of how to download and install Terraform on Windows, Linux and Mac OS. Terrafo ...

  8. Install ADDS on Windows Server 2012 R2 with PowerShell

    Install ADDS on Windows Server 2012 R2 with PowerShell Posted by ethernuno on 20/04/2014 In this tut ...

  9. How To Install OpenSSL on Windows

    转自 https://tecadmin.net/install-openssl-on-windows/ OpenSSL is a full-featured toolkit for the Trans ...

随机推荐

  1. js中call,caller,callee,aplly

    1.函数的caller属性 (1).区分函数是在函数体调用还是顶层代码中调用:顶层中调用函数,该函数的caller属性返回null,在函数中调用,会返回调用发i函数的函数: <script> ...

  2. javascript 面向对象之路.2 - 小蜜蜂

    接着上篇文章继续. 要实现上篇中gif图片的效果, 我们要写js, 算法并不是很复杂, 本次也仅仅展示了实现功能的代码, 并没有从面向对象的角度去构思或重构代码. 这里, 我们定义了一些变量, 用来定 ...

  3. 第四章 CSS3概述

    1.CSS3新增常用选择器(1)结构性伪类选择器:root 文档根元素 :nth-child(n) 第N个子元素"first-child 第一个元素 :kast-child 最后一个子元素 ...

  4. anconda1.8+cuda9.0+cudnn7.0.5+tensorflow1.7(win10)安装

    1.下载安装cuda9.0 https://developer.nvidia.com/cuda-90-download-archive 2.下载cudnn7.0.5,下载cuda9.0的对应版本 ht ...

  5. 在lua中从一个字符串中移除空间源码

    /* trim.c - based on http://lua-users.org/lists/lua-l/2009-12/msg00951.html from Sean Conner */ #inc ...

  6. curl 命令简介

    curl命令用于在命令行中发送HTTP请求: curl -i -H 'content-type: application/json' -X POST -d '{"name":&qu ...

  7. [转载]CSS各种居中方法

    水平居中的text-align:center 和 margin:0 auto   这两种方法都是用来水平居中的,前者是针对父元素进行设置而后者则是对子元素.他们起作用的首要条件是子元素必须没有被flo ...

  8. PDF文档导出

    代码如下: /// <summary> /// 获取html内容,转成PDF(注册) /// </summary> public void DownloadPDFByHTML( ...

  9. mysql安装登录

    接下来就开始安装mysql 下载地址:http://dev.mysql.com/downloads/mysql/  选择 dmg格式 下载完毕后,双击打开dmg文件,双击 “mysql-5.7.9-o ...

  10. easyui datagrid 遇到的坑 cannot read property ·· pageNum bug and so on

    1 本人刚刚接到一个bug,就是初始化时若设置了datagrid到指定页数,点击下一页显示不对,4 --> ‘4’+1=41的字符串形式,再点击超出页码范围直接到最后一页: 原因:因为 page ...