Class IntegrityFailureAdvice


  • public final class IntegrityFailureAdvice
    extends Object
    Formats and logs actionable recovery guidance when integrity verification fails.

    Verification still fails the build when failOnError is true; this class only improves the developer-facing failure UX so intentional edits are easy to re-seal or temporarily skip.

    Recovery text is both logged (logHashVerificationRecovery(Log)) and included in the MojoExecutionException message via formatHashVerificationRecovery() so it appears in Maven's final Failed to execute goal summary — the block users typically read after a long multi-module build.

    • Field Detail

      • SKIP_PROPERTY

        public static final String SKIP_PROPERTY
        Primary skip system property documented for end users.
        See Also:
        Constant Field Values
      • SKIP_PROPERTY_ALT

        public static final String SKIP_PROPERTY_ALT
        Alternate Maven-conventional skip system property.
        See Also:
        Constant Field Values
    • Method Detail

      • logHashVerificationRecovery

        public static void logHashVerificationRecovery​(org.apache.maven.plugin.logging.Log log)
        Logs recovery advice for AI resource hash verification failures (verify-hashes).
        Parameters:
        log - the Maven plugin logger; no-op when null
      • formatHashVerificationRecovery

        public static String formatHashVerificationRecovery()
        Formats recovery advice for AI resource hash verification failures for inclusion in a MojoExecutionException message.
        Returns:
        multi-line recovery text (no trailing newline)
      • logArtifactDigestVerificationRecovery

        public static void logArtifactDigestVerificationRecovery​(org.apache.maven.plugin.logging.Log log)
        Logs recovery advice for artifact digest verification failures ( verify-artifact-digests).
        Parameters:
        log - the Maven plugin logger; no-op when null
      • formatArtifactDigestVerificationRecovery

        public static String formatArtifactDigestVerificationRecovery()
        Formats recovery advice for artifact digest verification failures for inclusion in a MojoExecutionException message.
        Returns:
        multi-line recovery text (no trailing newline)