清理maven库的 xxx.jar.lastUpdated 文件bat脚本
clean-all_maven-repos.bat
@echo off
set REPOSITORY_PATH=%1
if "%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仓库根目录}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)