Maven has an agreed standard directory structure, as follows;
Directory Purpose
${basedir} Store pom.xml and all subdirectories
${basedir}/src/main/java project java source code
${basedir}/src/main/resources project resources, such as property files, springmvc .xml
${basedir}/src/test/java project test class, for example Junit code
${basedir}/src/test/resources test resources
${basedir}/src/main/webapp/WEB-INF web Application file directory, web project information, such as storing web.xml, local pictures, jsp view page
${basedir}/target Package output directory
${basedir}/target/classes Compile output directory
${basedir}/target/test-
Classes Test compilation output directory Test.java Maven will only automatically run test classes that conform to the naming rules
~/.m2/repository Maven default local warehouse directory location
Download a copy of maven and unzip it to a directory;
New environment variable;
Add maven's bin directory to the path environment variable;
Enter mvn -v on the command line, the corresponding version and prompt message will appear, and the maven environment will be configured;
Enter mvn -v on the command line and see if it was unsuccessful; see, the maven downloaded earlier is a source code, and there is no bin directory, so it cannot be run;
Make another copy, and modify the relevant environment variables, that's it; as shown below;