One-click deletion of useless files in the maven warehouse

1. Edit the "mavenUpdate.bat" file

My local warehouse address

2. The following is the content of the "updateMaven.bat" file.

Mainly deleted files, eg: files ending with _remote.repositories, sha1, lastUpdated.

set REPOSITORY_PATH=D:\ideaProject\reps
rem 正在搜索...
for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*_remote.repositories*"') 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%\*lastUpdated*"') do (
    del /s /q %%i
)
rem 搜索完毕
pause 

Guess you like

Origin blog.csdn.net/ChengXuYuan_Miao/article/details/124956688