Download jar maven package fails, the warehouse a large number of files appear .lastUpdated

I do not know because the central warehouse download speed or slow, maven project did not download jar package is good, red squiggly lines appear idea, review maven warehouse lot of .lastupdated files appear, these files can not be used, need to put all these documents remove and then re-download, if download or not to download it repeatedly will eventually delete downloaded, I sometimes is so repeated many times in order to download the jar package good.

Here is a windows bat script that when maven download jar package fails, delete those .lastUpdated batch file, so we do not have to own a warehouse a deleted.

@echo off
rem create by NettQun
  
rem 这里写你的仓库路径
set REPOSITORY_PATH=D:\Develop\my_maven_repository
rem 正在搜索...
for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*lastUpdated*"') do (
    echo %%i
    del /s /q "%%i"
)
rem 搜索完毕
pause

Copy the code above and paste it into a new good txt file, change the REPOSITORY_PATH own maven repository address, finally txt suffix to bat.

Published 23 original articles · won praise 6 · views 10000 +

Guess you like

Origin blog.csdn.net/weixin_42046751/article/details/103555521