Errors and Solutions Summary Maven build framework that can occur when

There have been very troublesome problem when this period of time to build springmvc or springboot maven project basis:

1, maven added depends jar package frequent error or missing;

2, pom.xml file frequent first line error.

In the domestic Internet to find a lot of ways, of course, 95% are not useful, and not unexpected, after all, most people are directly copied or reproduced, what pro-test is also useful to pull, estimates he Bowen did not even approach the author himself used, nothing to say.

In short, I read a lot of blog posts, summed up on three solutions:

1, the local maven repository repository directory (store maven directory on the network remotely downloaded from the jar package) , the directory corresponding jar package of error to delete, and then in the IDE (I use the eclipse) corresponding item click the right positioning to "Maven" and then "Update Project", let maven re-download the corresponding jar package. Of course, if you find it troublesome, you can put in the warehouse jar package directory delete all-time, and then re-download. (Note: I tried this method, but may not be able to solve the problem, because there may be multiple downloads are not required to download the full package jar, if we can solve the problem is the best.)

2. Select the following operations in the column below the title bar of the toolbar:

"Help - install new software - available software" click on "Add", fill in a pop-up window:

Name:MavenArchiver

location:http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-mavenarchiver/0.17.2/N/LATEST/

Link above the location I used once, no problem, but the second time it is not connected with a good network, for unknown reasons, it does not guarantee the availability, there is a need to go look for other blog links. (Note: this approach may not be feasible)

3, pom.xml file the first line error, is likely to be spring or other dependent pom.xml version of the problem set, it is too high in version springboot built springboot when I encountered with the original 2.1.5 :

<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.1.5.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

An error message.

2.1.1 changed:

    <parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.1.1.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

After the error disappeared. Thank bloggers https://blog.csdn.net/niangou0915/article/details/91346539 .

Guess you like

Origin blog.csdn.net/z1094219402/article/details/92398821