maven repository delete update

problem:

Maven downloads the jar package and there is a file problem at the end of .lastUpdated

The reason for the error:

The reason for the .lastUpdated file: The Maven dependency was not completely downloaded due to network reasons. In the case of private servers, it may be that the jar package of the corresponding version in the remote warehouse cannot be downloaded.
Solution:
1) First delete all files ending with .lastUpdate in the local warehouse.

solution

1. Enter your own maven's local warehouse and open the cmd command line in the current local warehouse directory to execute the command in Windows:

for /r %i in (*.lastUpdated) do del %i

The class library
executes the command in D:\apache-maven-3.5.2\repo Linux:

find /app/maven/localRepository -name “*.lastUpdated” -exec grep -q
“Could not transfer” {} ; -print -exec rm {} ;

2. Just pull it from the remote warehouse again.

Guess you like

Origin blog.csdn.net/qq_45850872/article/details/110282271