Maven 下载地址:https://maven.apache.org/download.cgi

下载解压出来,放到你想存放的位置下。

The installation of Apache Maven is a simple process of extracting the archive and adding the bin folder with the mvn command to the PATH.

Apache Maven 的安装是一个简单的过程,提取存档文件,并用‘ mvn’命令将‘ bin’文件夹添加到‘ PATH’中。

这也是我们常说的配置环境。

检查 JDK 环境是否正确配置

echo %JAVA_HOME% 

扩展阅读:JDK三个环境配置

Adding to PATH: Add the unpacked distribution’s bin directory to your user PATH environment variable by opening up the system properties (WinKey + Pause), selecting the “Advanced” tab, and the “Environment Variables” button, then adding or selecting the PATH variable in the user variables with the value C:\Program Files\apache-maven-3.6.3\bin. The same dialog can be used to set JAVA_HOME to the location of your JDK, e.g. C:\Program Files\Java\jdk1.7.0_51

注意:是将 Maven 中的 Bin 目录添加到Path中

验证:

按 win+r 重新启动一个 cmd 窗口,输入 mvn -v


腾讯云社区邀请各位技术博主加入,福利多多噢!
Last modification:August 25th, 2020 at 07:38 pm
如果觉得我的文章对你有用,请随意赞赏