ai-build-integrity:clean-hashes
Full name:
com.intsof:ai-build-integrity-maven-plugin:0.9.1-SNAPSHOT:clean-hashes
Description:
Removes companion hash sidecar files generated by the generate-hashes goal.
This mojo walks a base directory using NIO Files.walkFileTree, finds files matching the configured hash output extension, and deletes them. It binds by default to the clean phase, allowing easy cleanup of generated artifacts that live alongside source code (outside the traditional target directory).
Attributes:
- Requires a Maven project to be executed.
- The goal is thread-safe and supports parallel builds.
- Binds by default to the lifecycle phase:
clean.
Optional Parameters
| Name | Type | Since | Description |
|---|---|---|---|
<algorithmBits> |
int |
- |
Hash algorithm bit width. This is used to derive the default output extension if outputExtension is set to "auto".Default: 256User Property: ai.integrity.algorithm.bits |
<baseDir> |
String |
- |
Base directory to scan; defaults to ${project.basedir}.Default: ${project.basedir}User Property: ai.integrity.baseDir |
<centralHashFile> |
String |
- |
Explicit path to the central hash ledger file. When set, overrides the default target/ai-integrity.<ext> location.User Property: ai.integrity.centralHashFile |
<executionRootOnly> |
boolean |
- |
If true, the mojo will only execute in the reactor's execution root project. Default: falseUser Property: ai.integrity.executionRootOnly |
<forceIncludes> |
String |
- |
Comma-separated glob patterns for files that MUST be processed, bypassing .gitignore rules. User Property: ai.integrity.forceIncludes |
<gitignoreAutoExclude> |
boolean |
- |
If true, natively parse .gitignore files during traversal to auto-exclude paths. Default: falseUser Property: ai.integrity.gitignoreAutoExclude |
<hashFileMode> |
HashFileMode |
- |
Strategy for storing generated hashes (SIDECAR or CENTRAL). Default: SIDECARUser Property: ai.integrity.hashFileMode |
<hideHashFiles> |
boolean |
- |
If true, natively hides the generated hash sidecar files across all operating systems. Default: trueUser Property: ai.integrity.hideHashFiles |
<outputExtension> |
String |
- |
Output extension for hash sidecar files. When set to "auto" (the default), the extension is derived from algorithmBits (e.g. .sha256).Default: autoUser Property: ai.integrity.outputExtension |
<skip> |
boolean |
- |
If true, skips the execution of the mojo. Accepts both -Dai.integrity.skip=true and the Maven-conventional -Dskip.ai.integrity=true.Default: falseUser Property: ai.integrity.skip |
<skipAlt> |
boolean |
- |
Alternate Maven-conventional skip flag (e.g. -Dskip.ai.integrity=true). Default: falseUser Property: skip.ai.integrity |
<skipDirs> |
String |
- |
Comma-separated directory names to skip during traversal. Default: target,.git,node_modules,.tmpUser Property: ai.integrity.skipDirs |
Parameter Details
<algorithmBits>
Hash algorithm bit width. This is used to derive the default output extension if
outputExtension is set to "auto".- Type:
int - Required:
No - User Property:
ai.integrity.algorithm.bits - Default:
256
<baseDir>
Base directory to scan; defaults to
${project.basedir}.- Type:
java.lang.String - Required:
No - User Property:
ai.integrity.baseDir - Default:
${project.basedir}
<centralHashFile>
Explicit path to the central hash ledger file. When set, overrides the default
target/ai-integrity.<ext> location.- Type:
java.lang.String - Required:
No - User Property:
ai.integrity.centralHashFile
<executionRootOnly>
If true, the mojo will only execute in the reactor's execution root project.
- Type:
boolean - Required:
No - User Property:
ai.integrity.executionRootOnly - Default:
false
<forceIncludes>
Comma-separated glob patterns for files that MUST be processed, bypassing .gitignore rules.
- Type:
java.lang.String - Required:
No - User Property:
ai.integrity.forceIncludes
<gitignoreAutoExclude>
If true, natively parse .gitignore files during traversal to auto-exclude paths.
- Type:
boolean - Required:
No - User Property:
ai.integrity.gitignoreAutoExclude - Default:
false
<hashFileMode>
Strategy for storing generated hashes (SIDECAR or CENTRAL).
- Type:
com.intsof.ai.build.integrity.HashFileMode - Required:
No - User Property:
ai.integrity.hashFileMode - Default:
SIDECAR
<hideHashFiles>
If true, natively hides the generated hash sidecar files across all operating systems.
- Type:
boolean - Required:
No - User Property:
ai.integrity.hideHashFiles - Default:
true
<outputExtension>
Output extension for hash sidecar files. When set to
"auto" (the default), the extension is derived from algorithmBits (e.g. .sha256).- Type:
java.lang.String - Required:
No - User Property:
ai.integrity.outputExtension - Default:
auto
<skip>
If true, skips the execution of the mojo. Accepts both
-Dai.integrity.skip=true and the Maven-conventional -Dskip.ai.integrity=true.- Type:
boolean - Required:
No - User Property:
ai.integrity.skip - Default:
false
<skipAlt>
Alternate Maven-conventional skip flag (e.g. -Dskip.ai.integrity=true).
- Type:
boolean - Required:
No - User Property:
skip.ai.integrity - Default:
false
<skipDirs>
Comma-separated directory names to skip during traversal.
- Type:
java.lang.String - Required:
No - User Property:
ai.integrity.skipDirs - Default:
target,.git,node_modules,.tmp

