Maven installation and configuration, Maven configuration in IDEA, and error handling

1. Download the bin file from the official website

Insert picture description here

2. Unzip, environment variables

The home directory is configured with home environment variables, and the bin directory is configured with path variables

Insert picture description here
Insert picture description here

3. Set Ali acceleration source in setting.xml under conf

  <mirror>        
			<id>alimaven</id>      
		 	<name>aliyun maven</name>        
			<url>http://maven.aliyun.com/nexus/content/groups/public/</url>        
		 	<mirrorOf>*</mirrorOf> 
  </mirror>

Insert picture description here

4. Configure the local jar warehouse

<localRepository>F:\Maven_repository</localRepository>

Insert picture description here

5. mvn -v check installation

Insert picture description here

6. About IDEA using Maven

File——Setting
Insert picture description here

7. IDEA takes a long time to use for the first time, wait patiently

8. IDEA guide MVN package is popular

Insert picture description hereInsert picture description here

Solution:

1. Try to refresh

Insert picture description here
Insert picture description here

2. Add library

Insert picture description hereInsert picture description here

  <repositories>
    <repository>
      <id>Central Repository</id>
      <url>https://repo1.maven.org/maven2/</url>
    </repository>
  </repositories>

Replace those above, add to the front of pom.xml, and refresh
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_41170600/article/details/106378582