Maven has been successfully loaded dependence, but still error solutions

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq262593421/article/details/100186665

                     Maven has been successfully loaded dependence, but still error solutions

 

Look at the pom.xml file

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.gxwz</groupId>
  <artifactId>lottery3</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>

	<build>
		<finalName>lottery</finalName>
	</build>
	<properties>
		<spring.version>5.1.5.RELEASE</spring.version>
	</properties>

	<dependencies>
		<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
		<dependency>
		    <groupId>org.springframework</groupId>
		    <artifactId>spring-webmvc</artifactId>
		    <version>${spring.version}</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.hynnet/jxl -->
		<dependency>
			<groupId>com.hynnet</groupId>
			<artifactId>jxl</artifactId>
			<version>2.6.12.1</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
		<dependency>
		    <groupId>javax.servlet</groupId>
		    <artifactId>javax.servlet-api</artifactId>
		    <version>3.1.0</version>
		    <scope>provided</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/taglibs/standard -->
		<dependency>
		    <groupId>taglibs</groupId>
		    <artifactId>standard</artifactId>
		    <version>1.1.2</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/javax.servlet/jstl -->
		<dependency>
		    <groupId>javax.servlet</groupId>
		    <artifactId>jstl</artifactId>
		    <version>1.2</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas -->
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml</artifactId>
			<version>3.14</version>
		</dependency>
		
	</dependencies>

</project>

Look Project Screenshot:

 

According to the screenshot you can see, the project has been successfully loaded all of the dependent jar package,

But the question is, pom.xml file error, display jar package not found.

According to Discover the test, add a jar package pom.xml org.apache.poi this will have an error.

		<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas -->
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml</artifactId>
			<version>3.14</version>
		</dependency>

 

After a half-day only to find that Maven toss there have been many xxx.jar.lastUpdated files in the background Executive Management jar package.

 

solution:

 

Found in the Libraries-Maven Dependencies projects do things Maven dependencies poi-xxx.ar,

The right mouse button to find the specific location of the jar wrapped in a local warehouse

 

 

Then put xxx.jar.lastUpdated kill all the file suffix

 

Update Maven project right project -Maven-Update Project

 

After updating the error disappear, you're done!

 

 

Like the point of a small partner remember praise! ! !

If you remember also help to point a praise! ! !

Guess you like

Origin blog.csdn.net/qq262593421/article/details/100186665