清理maven库的 xxx.jar.lastUpdated 文件bat脚本
clean-all_maven-repos.bat
@echo offset REPOSITORY_PATH=%1if "%REPOSITORY_PATH%" == "" (echo "Usage: %0 <maven_repository_path>"echo "Example: %0 D:\\OneMvnRepository"echo "Explain: "~" is your profile's home directory" echo. echo. echo "press enter to quit!" & pause > nul goto :eof)echo. echo "Began clean lastUpdated file"echo. for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*lastUpdated*"') do (del /s /q %%i)for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*sha1*"') do (del /s /q %%i)for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*repositories*"') do (del /s /q %%i)echo. echo "End clean lastUpdated file."echo. echo. echo "press enter to exit!" & pause > nul exit
使用方法
./脚本文件.bat {maven仓库根目录}
如果觉得《清理maven库的 xxx.jar.lastUpdated 文件bat脚本》对你有帮助,请点赞、收藏,并留下你的观点哦!