Class ScanRendererLogsMojo
java.lang.Object
network.ike.docs.plugin.ScanRendererLogsMojo
- All Implemented Interfaces:
org.apache.maven.api.plugin.Mojo
@Mojo(name="scan-logs",
defaultPhase="verify")
public class ScanRendererLogsMojo
extends Object
implements org.apache.maven.api.plugin.Mojo
Scan renderer log files for error patterns and print a summary.
Finds all renderer-*.log files in the configured directory,
counts lines matching common error patterns (error, fatal, exception,
failed, not found), and prints a one-line summary per renderer.
Never fails the build — renderer exit codes already fail the build if appropriate. This goal is informational only.
Replaces: scan-renderer-logs.sh
Usage:
mvn ike:scan-logs -DlogsDir=target/generated-docs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcountErrors(String logContent) Count lines containing error patterns in log content.voidexecute()static StringextractRendererName(String filename) Extract the renderer name from a log filename.static StringformatSummary(String rendererName, int lines, int errors) Format a one-line summary for a renderer log.protected org.apache.maven.api.plugin.LoggetLog()Access the Maven logger.
-
Constructor Details
-
ScanRendererLogsMojo
public ScanRendererLogsMojo()Creates this goal instance.
-
-
Method Details
-
getLog
protected org.apache.maven.api.plugin.Log getLog()Access the Maven logger.- Returns:
- the logger
-
execute
public void execute() throws org.apache.maven.api.plugin.MojoException- Specified by:
executein interfaceorg.apache.maven.api.plugin.Mojo- Throws:
org.apache.maven.api.plugin.MojoException
-
countErrors
Count lines containing error patterns in log content.Matches case-insensitively against: error, fatal, exception, failed, not found.
- Parameters:
logContent- the log file content- Returns:
- number of lines containing at least one error pattern
-
formatSummary
-
extractRendererName
-