Maven installation and configuration in Eclipse

1. Download apache-maven-3.6.3 from the official website: http://maven.apache.org/download.cgi

2. Configure environment variables:

Create a new system variable name MAVEN_HOME, the variable value is apache-maven-3.6.3 download and unzip the directory

Configure the system variable Path and add the new variable value% MAVEN_HOME% \ bin

3. Verify that the configuration is successful. Open cmd.exe and enter the command mvn -version. If the following interface appears, the maven installation and configuration is successful

4. Continue to configure maven in the Eclipse environment

Click Help-> Eclipse Marketplace on the eclipse menu bar to search for the keyword maven to plug-in Maven Integration for Eclipse and click install

After installation, restart eclipse, install the Maven plugin in Eclipse, click Window-> Preference-> Maven-> Installation

Click Add to configure, select the path value to install Maven

Use Notepad or other text editor to punch in the settings.xml file in the cong under the maven installation directory

In the settings.xml file, find <localRepository> and move the / path / to / local / repo line out of the comment, and modify it to D: \ Program Files \ Maven \ maven-repository (the local repository is manually created)

In Preferences-> Maven-> User Settings, select the settings.xml directory

At this point, the Maven installation has been configured in eclipse

Published 27 original articles · Likes6 · Visits 1403

Guess you like

Origin blog.csdn.net/Sabrina_cc/article/details/103288575