maven environment variable configuration
Open the System Environment Variables dialog
- Right click "My Computer" -> "Properties"
- In the properties panel that opens, select "Advanced system settings" /li>
- In the advanced system settings dialog that opens, select the "Advanced" tab -> "Environment Variables"
- Set the following information in "Environment Variables":
Administrator's User Variable
Variable Value
java_home D:\Program Files\Java\jdk1.8.0_25
M2_HOME D:\Program Files\apache-maven-3.3.3
path %M2_HOME%\bin
Test whether the maven configuration is successful to open the command line window,
Type mvn -v
If there is maven version information output, it proves that the configuration is successful, otherwise, please check whether the configuration path is correct.
Note: Before installing maven, make sure you have installed JDK and successfully configured its environment variables.