Failure to transfer org.apache.maven.plugins:maven-resources-plugin:jar:2.6

eclipse导入maven项目后pom.xml的报错信息如下:
Failure to transfer org.apache.maven.plugins:maven-resources-plugin:jar:2.6 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:jar:2.6 from/to central (https://repo.maven.apache.org/maven2):
sun.security.validator.ValidatorException: PKIX path building failed:sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

According to the prompts, it can be seen that the maven dependency download is incomplete, so you need to
1. Delete the original 2. Update the import again
1. Add the following code to pom.xml

	    <dependency>
    		<groupId>org.apache.maven.plugins</groupId>
    		<artifactId>maven-resources-plugin</artifactId>
    		<version>2.6</version>
		</dependency>

Find the path D:\program\apache-maven-3.8.1\maven-repository\org\apache\maven\plugins\maven-resources-plugin and delete it 2. Select the
Insert image description here
project–
Insert image description here
》Right-click–》Maven–》Update Project– 》OK
Insert image description here
After the update, you can see that the download has been completed and the error message disappears.
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_46475607/article/details/123481274