maven仓库中的LastUpdated文件删除脚本

cleanLastUpdated.bat(windows版本)

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

  

cleanLastUpdated.sh(linux版本)

# create by NettQun  
  
# 这里写你的仓库路径  
REPOSITORY_PATH=~/Documents/tools/repository  
echo 正在搜索...  
find $REPOSITORY_PATH -name "*lastUpdated*" | xargs rm -fr  
echo 搜索完  

  

猜你喜欢

转载自www.cnblogs.com/techliang666/p/9159891.html