1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 21:20:09 +00:00

feat(clean): add Maven local repository cleanup support

This commit is contained in:
tw93
2026-02-16 18:54:19 +08:00
parent 573f55e79e
commit abd9791cd7

15
lib/clean/maven.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# Maven Repository Cleanup Module
set -euo pipefail
# Maven local repository cleanup.
# Path: ~/.m2/repository
# Note: This path is in the default whitelist. Remove from whitelist to enable cleanup.
clean_maven_repository() {
local maven_repo="$HOME/.m2/repository"
# Only clean if the directory exists
[[ -d "$maven_repo" ]] || return 0
safe_clean "$maven_repo"/* "Maven local repository"
}