Class InjectBreadcrumbMojo
java.lang.Object
network.ike.docs.plugin.InjectBreadcrumbMojo
- All Implemented Interfaces:
org.apache.maven.api.plugin.Mojo
@Mojo(name="inject-breadcrumb",
defaultPhase="verify")
public class InjectBreadcrumbMojo
extends Object
implements org.apache.maven.api.plugin.Mojo
Inject navigation breadcrumbs and theme overrides into JaCoCo HTML reports.
Finds all HTML files in the target directory and:
- Prepends a "back to project site" link in the breadcrumb div
- Injects a CSS link to
ike-theme.cssfor visual alignment with the project's Maven site skin - Writes
ike-theme.cssinto the JaCoCo resources directory
Usage:
mvn ike:inject-breadcrumb -DtargetDir=target/site/jacoco
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()static StringGenerate the IKE theme override CSS for JaCoCo reports.protected org.apache.maven.api.plugin.LoggetLog()Access the Maven logger.static StringinjectBreadcrumb(String html, String link, String label) Inject a breadcrumb navigation link into JaCoCo's breadcrumb div.static StringinjectThemeCssLink(String html) Inject a CSS link to the IKE theme override after the existing report.css link.
-
Constructor Details
-
InjectBreadcrumbMojo
public InjectBreadcrumbMojo()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
-
injectBreadcrumb
Inject a breadcrumb navigation link into JaCoCo's breadcrumb div.- Parameters:
html- the HTML contentlink- relative URL for the breadcrumb linklabel- display label for the link- Returns:
- HTML with the breadcrumb injected, or unchanged if the breadcrumb div is not present
-
injectThemeCssLink
-
generateThemeCss
Generate the IKE theme override CSS for JaCoCo reports.Overrides JaCoCo's default styling to approximate the Sentry Maven Skin purple theme: dark header bar, consistent font stack, purple accent colors, and improved table readability.
- Returns:
- CSS content as a string
-