标签:无效 mon lease 失效 its find pat master tor
在进行maven开发时,往往需要下载大量jar包,而由于网络不稳定等其他因素可能导致jar未下载完毕,然后保留了lastUpdated文件,导致无法更新失效的jar包。
现在提供个bat脚本,只需要输入maven本地仓库地址就可以将失效的lastUpdated信息删除,maven就能够重新下载失效的jar。
@echo off
echo @describe Find out all lastUpdated, and delete its.
echo @github https://github.com/cjunn/script_tool/
echo @author cjunn
echo @date Mon Jan 13 2020 13:13:56 GMT+0800
:again
set /p REPOSITORY_PATH=Please enter the local Maven warehouse Path:
:: Remove all double quotes
set REPOSITORY_PATH=%REPOSITORY_PATH:"=%
if not exist "%REPOSITORY_PATH%" (
echo Maven warehouse address not found, please try again.
goto again
)
for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*lastUpdated*"') do (
del /s /q "%%i"
)
echo Expired files deleted successfully.
pause;
标签:无效 mon lease 失效 its find pat master tor
原文地址:https://www.cnblogs.com/cjunn/p/12191405.html