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. 删除的文件无法恢复,可以先备份后删除
相关推荐
lilian23325 分钟前
Harmony os 技术实战|拼豆制图10:把取消、解析失败和保存失败写成可恢复状态机
java·javascript·华为·harmonyos
whn19771 小时前
达梦连接串JDBC测试程序
java·数据库
还是鼠鼠1 小时前
Spring AI ChatClient详解:创建第一个AI客户端
java·springboot·spring ai·chatclient
vHelios1 小时前
【电商项目】测试 授权功能 遇到的问题与解决方案
java·spring boot·sql
2401_894915532 小时前
GEO 定位优化源码搭建常见报错排查:数据库、伪静态、接口调试
java·数据库·网络协议·tcp/ip·spring·unity
bbq粉刷匠2 小时前
ArrayList 整体认识
java·jvm·数据结构
水无痕simon2 小时前
15 转账对接文档
java·区块链
西凉的悲伤2 小时前
Java 基于 MySQL 行锁实现高并发业务序列号生成器
java·mysql·springboot·序列号生成
lv__pf2 小时前
servlet与jsp
java·开发语言·servlet
xieliyu.2 小时前
Java 文件IO :File 文件类、字节流、字符流讲解
java·ide·笔记·javaee