maven 安装设置方法

以下摘自官网指导

Windows Tips

  • Check environment variable value e.g.
  1. echo %JAVA_HOME%
  2. C:Program FilesJavajdk1.7.0_51
  • 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 Filesapache-maven-3.3.9in. The same dialog can be used to set JAVA_HOME to the location of your JDK, e.g. C:Program FilesJavajdk1.7.0_51

  • Open a new command prompt (Winkey + R then type cmd) and run mvn -v to verify the installation.

原文地址:https://www.cnblogs.com/zhengchunhao/p/5390105.html