Curiosity777
V2EX  ›  Java

有什么优雅的方式清理 Maven 仓库下载失败包吗

  •  
  •   Curiosity777 · Apr 22, 2024 · 5350 views
    This topic created in 932 days ago, the information mentioned may be changed or developed.
    8 replies  •  2024-05-06 16:54:58 +08:00
    dncba
    dncba
    Apr 22, 2024
    1
    本地仓库直接删目录
    WUWENZE
    WUWENZE
    Apr 22, 2024
    2
    find ~/.m2/repository -type f -name "*.lastUpdated" -exec rm -vrf {} \;
    flyup
    flyup
    Apr 22, 2024
    3
    everything 打开,直接搜索.lastUpdated
    Curiosity777
    Curiosity777
    OP
    Apr 22, 2024
    4
    @WUWENZE windows 环境
    Curiosity777
    Curiosity777
    OP
    Apr 22, 2024
    5
    @flyup 这个可以
    cherishd
    cherishd
    Apr 22, 2024❤️2
    6
    repository 目录下 cmd ,不要用 powershell

    for /r %i in (*.lastUpdated) do del %i
    Curiosity777
    Curiosity777
    OP
    Apr 23, 2024
    7
    @hellwen 👍
    standstill
    standstill
    May 6, 2024
    8
    set REPOSITORY_PATH=D:\your\maven\repository
    for /f "delims=" %%i in ('dir /b /s "%REPOSITORY_PATH%\*lastUpdated*"') do (
    del /s /q %%i
    )
    rem 搜索完毕
    pause


    bat 脚本
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2219 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 14:21 · PVG 22:21 · LAX 06:21 · JFK 09:21
    ♥ Do have faith in what you're doing.