Batch deletion of Maven repository under Windows fails to download .jar.lastupdate files


At present, I have been using maven to develop projects, but I often encounter that some Jar packages are not available on the company's private server, but the suffix of these jar packages has been added with .lastupdate, so it will not be downloaded automatically, only manually. To delete one by one, the efficiency is extremely slow, and the workload is also greatly increased. It is necessary to find the .lastupdate of each jar, which is too troublesome to find. In fact, only one command is needed to delete in batches:
first enter maven Local repository address: C:\Users\Administrator\.m2\repository Linux is in /home or /root, depending on whether you are logged in as root, use CMD to enter the Windows path, and execute the following command:

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

 

 

Original address: https://blog.liyang.io/111.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326021450&siteId=291194637