Maven仓库清除remote.repositories、lastUpdated、sha1脚本

Maven仓库清除remote.repositories、lastUpdated、sha1脚本

1. 脚本功能

清除本地maven仓库的_remote.repositories、sha1、lastUpdated的文件

2. 脚本内容

复制代码
set REPOSITORY_PATH=%cd%
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 

3. 使用方式

  1. 新建deleteMaven.bat文件
  2. 右键编辑该文件,填入【脚本内容】
  3. 把deleteMaven.bat文件放入maven仓库的根目录,以管理员权限执行
  4. 删除的文件无法恢复,可以先备份后删除
相关推荐
xcl09255 小时前
北京24小时自助健身房系统软件开发实战:从架构到部署全流程指南
java·spring boot·架构
一 乐6 小时前
动漫书销售商城|基于springboot + vue动漫书销售商城(源码+数据库+文档)
java·数据库·vue.js·spring boot·毕业设计
卓怡学长7 小时前
w214基于jsp知道特产网
java·intellij-idea
步行cgn7 小时前
Spring 注解使用详解
java·spring
一条小小yu7 小时前
Spring IoC的理解
java·后端·spring
落魄实习生7 小时前
Agent Scope Java 2.x 系列【7】工具使用
java·开发语言·ai
旺仔学长 哈哈7 小时前
springboot钓鱼爱好者交流平台APP设计与实现
java·spring boot·mysql·充电桩管理系统
自强的小白9 小时前
核心功能(Service接口)
java·mybatis
乌暮10 小时前
深入理解 Java 泛型:把「万能盒子」用对、用稳
java·开发语言·后端·学习