1.
3. Add M2_home and Maven_home
Add the M2_home and Maven_home environment variables to the WINDOWS environment variable and point it to your MAVEN folder.
M2_home or Maven_home
Maven says it just adds M2_home, but some projects still refer to Maven's folder Maven_home, so add it for security.
4. Add to environment variable-PATH
Update the PATH variable, add the Maven Bin folder to the end of path, such as:%m2_home%\bin, so that you can run the MAVEN command in any directory in the command.
5. In Maven, when you declare a library that does not exist in the local repository and does not exist in the MAVEN central repository, the process stops and outputs the error message to the MAVEN console.
7.
Now, the Dependency Library query order of MAVEN changes to:
- Search in Maven local repository, if not found, enter 2nd step, otherwise exit.
- In the Maven central repository search, if not found, enter the 3rd step, otherwise exit.
- The remote repository search in java.net maven, if not found, prompts for an error message, otherwise exits.
MAVEN was developed by Apache as well as Java. Maven needs support for your local system JDK