Class RenderPdfMojo

java.lang.Object
network.ike.docs.plugin.RenderPdfMojo
All Implemented Interfaces:
org.apache.maven.api.plugin.Mojo

@Mojo(name="render-pdf", defaultPhase="package", projectRequired=true) public class RenderPdfMojo extends Object implements org.apache.maven.api.plugin.Mojo
Render PDF from intermediate files using an external renderer.

Wraps the five PDF renderers supported by the IKE documentation pipeline into a single Maven goal with consistent configuration, executable validation, and multi-document support.

Renderers fall into two families:

  • CSS-based (prince, ah, weasyprint) — convert print-layout HTML to PDF via CSS Paged Media
  • FO-based (xep, fop) — convert XSL-FO to PDF

By default, the goal discovers all input files in inputDir and renders each one. To render specific documents, set the documents parameter to a list of base names (without extension).

If the goal is skipped, it produces no log output at all — unlike exec-maven-plugin which logs "skipping" for every skipped execution.

Usage in a POM:

<execution>
  <id>prince-pdf</id>
  <phase>package</phase>
  <goals><goal>render-pdf</goal></goals>
  <configuration>
    <renderer>prince</renderer>
    <inputDir>${asciidoc.output.directory}/pdf-html-prince</inputDir>
    <outputDir>${asciidoc.output.directory}/pdf-prince</outputDir>
    <stylesheet>${asciidoc.output.directory}/pdf-html-prince/ike-print.css</stylesheet>
  </configuration>
</execution>
  • Constructor Details

    • RenderPdfMojo

      public RenderPdfMojo()
      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:
      execute in interface org.apache.maven.api.plugin.Mojo
      Throws:
      org.apache.maven.api.plugin.MojoException