1. Download the Maven version
Official website address: http://maven.apache.org/download.cgi
Download the Maven URL directly: https://mirrors.tuna.tsinghua.edu.cn/apache//maven/
The suffix tar.gz can be used on Linux systems, and the suffix zip can be used directly on Windows systems.
binary means that the compiled binary file source means that the source code is included
2. Modify the Maven configuration file parameters (taking apache-maven-3.3.9 as an example)
apache-maven-3.3.9→conf→ settings.xml (mainly find the configuration file), perform the following operations in the configuration file
2.1 Find the <localRepository>/path/to/local/repo</localRepository> statement in the comment , cancel the comment of the statement, and set it
Set the local repository (stores the location of files and jar packages downloaded according to the dependency, and customizes the path )
<localRepository>D:/maven/r2/myrepository</localRepository>
2.2 Modify jdk version()
Maven 3.3+ requires JDK 1.7 or higher to execute - they still allow you to build 1.3 and other JDK versions by using toolchains
Uncomment the <profile>...</profile> content within the <profile s > tag range, and configure the corresponding jdk version according to the actual situation
2.3 Modify the mirror address
3. Configure Maven on eclipse
Operation path: Window→Preferences→Maven→Installations→Add
3.1 Adding Maven version
3.2 Set the current version of Maven
3.3 After configuration, you can download related source files at the same time.
4. Configure Maven environment variables
M2_HOME Maven file path
5. An error occurred : Tomcat cannot find the parameters that need to be set
window→ preferences→java→installed jres-→jdk edit, add the following statement to vm arguments
-Dmaven.multiModuleProjectDirectory=$M2_HOME
The premise is that the system variable M2_HOME is included in the system variable