Class AbstractDocbkxMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.forgerock.doc.maven.AbstractDocbkxMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
BackstageMojo, ManpagePost, NoOp, PreProcessMojo, PreSiteMojo, ReleaseMojo, SiteMojo

public abstract class AbstractDocbkxMojo extends org.apache.maven.plugin.AbstractMojo
AbstractMojo implementation for building core documentation from DocBook XML using docbkx-tools.
  • Constructor Details

  • Method Details

    • useAnsi

      public final String useAnsi()
      Whether to use WinAnsi encoding for embedded fonts.
      Value: false
      Returns:
      Whether WinAnsi encoded should be used for embedded fonts.
    • areSectionsAutolabeled

      Whether sections should have numeric labels.
      Value: true
      docbkx-tools element: <sectionAutolabel>
      Returns:
      Whether sections should have numeric labels.
    • getAsciidocSourceDirectory

      Get the base directory for Asciidoc source files. These files remain unchanged during processing.
      Default: ${basedir}/src/main/asciidoc.
      Returns:
      The base directory for Asciidoc source files.
    • getAsciidoctorPluginVersion

      Returns the version of the Asciidoctor Maven plugin to use.
      Returns:
      The version of the Asciidoctor Maven plugin to use.
    • getBackstageDirectory

      Get the file system directory for Backstage layout output.
      Default: ${project.build.directory}/backstage
      Returns:
      The file system directory for Backstage layout output.
    • getBackstageProductName

      Get the product name as shown on Backstage.
      Default: projectName
      Returns:
      The product name as shown on Backstage.
    • getBaseConfiguration

      public ArrayList<org.twdata.maven.mojoexecutor.MojoExecutor.Element> getBaseConfiguration()
      Get the base configuration applicable to all builds with the docbkx-tools plugin.
      Returns:
      The configuration applicable to all builds.
    • getBaseDir

      public File getBaseDir()
      Project base directory, needed to workaround bugs with *target.db and webhelp.
      Default: ${basedir}
      Returns:
      The project base directory.
    • getBrandingArtifactId

      Gets the branding artifactId to use.
      Default: doc-default-branding.
      Returns:
      The branding artifactId.
    • getBrandingGroupId

      Gets the groupId of the branding artifact to use.
      Default: org.wrensecurity.common
      Returns:
      The branding groupId.
    • getBrandingVersion

      Gets the version of the branding artifact to use.
      Returns:
      The branding artifact version.
    • getBuildDirectory

      Get the project build directory for this plugin.
      Default: ${project.build.directory}.
      Returns:
      The build directory.
    • doBuildReleaseZip

      public final boolean doBuildReleaseZip()
      Whether to build a .zip containing the release content.
      Default: false
      Returns:
      true if the .zip should be built.
    • getChunkedHTMLCustomization

      Get the location of the chunked HTML XSL stylesheet customization file.
      Default: ${project.build.directory}/docbkx-stylesheets/html/chunked.xsl
      docbkx-tools element: <htmlCustomization>
      Returns:
      The location of the chunked HTML XSL stylesheet.
    • getCommonContentArtifactId

      Get the artifactId of the common content artifact.
      Default: doc-common-content.
      Returns:
      The artifactId of the common content artifact.
    • getCommonContentGroupId

      Get the groupId of the common content artifact.
      Default: org.wrensecurity.common.
      Returns:
      The groupId of the common content artifact.
    • getCommonContentVersion

      Get the version of the common content artifact to use.
      Returns:
      the version of the common content artifact to use.
    • doCopyResourceFiles

      public boolean doCopyResourceFiles()
      Whether to copy resource files alongside docs for site, release.
      Default: false
      Returns:
      true if resource files should be copied.
    • doCreateArtifacts

      public boolean doCreateArtifacts()
      Whether to build artifacts from pre-processed sources.
      Default: true
      Returns:
      true if artifacts should be build from pre-processed sources.
    • getArtifactItems

      Get the doc artifacts to unpack when preparing Backstage layout.
      Returns:
      The doc artifacts to unpack when preparing Backstage layout.
    • getDocbkxModifiableSourcesDirectory

      Get the base directory for the modifiable copy of DocBook XML source files. This copy is modified during preparation for processing.
      Value: ${project.build.directory}/docbkx-sources
      Returns:
      The base directory for the modifiable copy of DocBook XML source files.
    • getDocbkxOutputDirectory

      Base directory for built documentation.
      Value: ${project.build.directory}/docbkx
      Returns:
      The base directory for built documentation.
    • getDocbkxSourceDirectory

      Get the base directory for DocBook XML source files. These files remain unchanged during processing.
      Default: ${basedir}/src/main/docbkx.
      Returns:
      The base directory for DocBook XML source files.
    • getDocbkxVersion

      Get the docbkx-tools plugin version to use.
      Returns:
      The docbkx-tools plugin version to use
    • getInclusions

      Returns a map of DocBook profile settings to include elements.
      This implementation ignores unexpected profile settings.
      Returns:
      A map of DocBook profile settings to include elements, or null if none are set.
    • getExclusions

      Returns a map of DocBook profile settings to exclude elements.
      This implementation ignores unexpected profile settings.
      Returns:
      A map of DocBook profile settings to exclude elements, or null if none are set.
    • getDocNames

      public Set<String> getDocNames() throws org.apache.maven.plugin.MojoExecutionException
      Get document names for the current project.
      Returns:
      The document names for the current project.
      Throws:
      org.apache.maven.plugin.MojoExecutionException - No document names found.
    • getDocsSite

      public String getDocsSite()
      Get the URL to the site for published documentation.
      Default: https://docs.wrensecurity.org/
      Returns:
      The URL to the site for published documentation.
    • getDocumentSrcName

      Get the top-level DocBook XML source document name.
      Default: index.xml.
      Documents included in the documentation set such as books, articles, and references share a common entry point, which is a file having the name specified by this element.
      For example, if your documentation set has Release Notes, an Installation Guide, an Admin Guide, a Dev Guide, and a Reference, your source layout under the base DocBook XML source directory might look like the following:
       src/main/docbkx/
        admin-guide/
         index.xml
         ...other files...
        dev-guide/
         index.xml
         ...other files...
        install-guide/
         index.xml
         ...other files...
        reference/
         index.xml
         ...other files...
        release-notes/
         index.xml
         ...other files...
        shared/
         ...other files...
       

      The ...other files... can have whatever names you want, as long as the name does not match the file name you configure. For example, if you were to hand-code an index file you could name it ix.xml.
      Returns:
      File name of top-level DocBook XML source document.
    • doesSectionLabelIncludeComponentLabel

      Whether section labels should include parent numbers, like 1.1, 1.2, 1.2.1, 1.2.2.
      Value: true
      docbkx-tools element: <sectionLabelIncludesComponentLabel>
      Returns:
      Whether section labels should include parent numbers.
    • getDraftWatermarkURL

      public final String getDraftWatermarkURL()
      For draft mode, URL to the background watermark image.
      Default: http://docbook.sourceforge.net/release/images/draft.png
      docbkx-tools element: <draftWatermarkImage>
      Returns:
      The URL to the background watermark image.
    • getEoslJson

      public String getEoslJson()
      Get the URL to JSON object showing EOSL versions for each project.
      Returns:
      The URL to the JSON object.
    • getEpubCustomization

      public final File getEpubCustomization()
      Get the location of the EPUB XSL stylesheet customization file.
      Default: ${project.build.directory}/docbkx-stylesheets/epub/coredoc.xsl
      docbkx-tools element: <epubCustomization>
      Returns:
      The location of the EPUB XSL stylesheet customization file.
    • getFaviconLink

      public final String getFaviconLink()
      Get the favicon link element for the pre-site version of the HTML.
      Returns:
      The link element.
    • getFoCustomization

      public final File getFoCustomization()
      Get the location of the FO XSL stylesheet customization file (for PDF, RTF).
      Value: ${project.build.directory}/docbkx-stylesheets/fo/coredoc.xsl
      docbkx-tools element: <foCustomization>
      Returns:
      The location of the FO XSL stylesheet.
    • getFontsDirectory

      public final File getFontsDirectory()
      Directory where fonts and font metrics are stored.
      Value: ${project.build.directory}/fonts
      Returns:
      The directory where fonts and font metrics are stored.
    • getFopHyphVersion

      Get the version of the FOP hyphenation plugin to use.
      Returns:
      The version of the FOP hyphenation plugin to use.
    • getFopLogLevel

      public final String getFopLogLevel()
      Log level when building FO output (PDF, RTF).
      Default: ERROR
      docbkx-tools element: <fopLogLevel>
      Returns:
      The log level for Apache FOP.
    • getFormats

      Return a list of output formats to generate.
      Default: bootstrap,pdf
      Returns:
      List of output formats.
    • getGoogleAnalyticsId

      Google Analytics identifier for the project.
      Default: UA-REMOVED-VALUE
      Returns:
      The Google Analytics identifier.
    • isDraftMode

      public final String isDraftMode()
      Whether these are draft documents, rather than final documents.
      Default: yes
      docbkx-tools element: <draftMode>
      Returns:
      Whether these are draft documents.
    • isXincludeSupported

      public final String isXincludeSupported()
      Whether documents should be allowed to include other documents.
      Value: true
      docbkx-tools element: <xincludeSupported>
      Returns:
      Where documents should be allowed to include other documents.
    • getJavaScriptFileName

      Get the main JavaScript file name, found under /js/ in plugin resources.
      Value: uses-jquery.js
      Returns:
      The JavaScript file name.
    • getJCiteSourcePaths

      Get the source paths where cited Java files are found.
      If source paths are not set, src/main/java is used.
      Returns:
      the set of source paths where cited Java files are found.
    • getJCiteVersion

      Get the JCite artifact version to use for Java code citations.
      Returns:
      The JCite artifact version to use for Java code citations.
    • keepCustomIndexHtml

      public boolean keepCustomIndexHtml()
      Whether to keep a custom index.html file for the documentation set.
      Default: false
      Returns:
      Whether to keep a custom index.html file.
    • getLatestJson

      Get the URL to JSON object showing latest versions for each project.
      Returns:
      The URL to the JSON object.
    • getLinkTesterVersion

      ForgeRock link tester plugin version to use.
      Returns:
      The link tester plugin version to use.
    • getLocaleTag

      public String getLocaleTag()
      Get the Locale tag for the documentation set.
      Default: en
      Returns:
      The Locale tag for the documentation set.
    • getManpagesCustomization

      Get the location of the man page XSL stylesheet customization file.
      Value: ${project.build.directory}/docbkx-stylesheets/man/coredoc.xsl
      docbkx-tools element: <manpagesCustomization>
      Returns:
      The location of the man page XSL stylesheet.
    • getMavenAssemblyVersion

      Get the version of the Maven dependency plugin to use.
      Returns:
      The version of the Maven dependency plugin to use.
    • getMavenDependencyVersion

      Get the version of the Maven dependency plugin to use.
      Returns:
      The version of the Maven dependency plugin to use.
    • getMavenFilteringVersion

      Get the version of the Maven filtering library to use.
      This is used as a workaround for MSHARED-325.
      Returns:
      The version of the Maven filtering library to use.
    • getMavenResourcesVersion

      Get the Maven resources plugin version. Executions seem to hit an NPE when the version is not specified.
      Returns:
      The Maven resources plugin version.
    • getMaxImageHeightInInches

      Get maximum height for PNG images used in PDF, in inches.
      Returns:
      Maximum height for PNG images used in PDF, in inches.
    • doOverwriteModifiableCopy

      public boolean doOverwriteModifiableCopy()
      Whether to overwrite the copy of DocBook sources if it exists.
      One of the first things the plugin does when preparing DocBook sources is to make a working copy of the files that is separate from the sources. This allows the plugin to make changes to the files as necessary.
      If for some reason you must provide the copy yourself, and your copy must be in the docbkxModifiableSourcesDirectory, then you can set this to false to prevent the plugin from replacing the copy. The plugin will then pre-process the copy, however, so expect the files in the modifiable copy to be changed.
      Default: true
      Returns:
      Whether to overwrite the copy of DocBook sources if it exists.
    • doOverwriteProjectFilesWithSharedContent

      Whether to overwrite project files with shared content.
      Default: true
      Returns:
      Whether to overwrite project files with shared content.
    • path

      public String path(File file)
      Get path name in UNIX format.
      Parameters:
      file - Path to return in UNIX format.
      Returns:
      The path in UNIX format.
    • getPlantUmlVersion

      Get the version of the PlantUML artifact.
      Returns:
      The version of the PlantUML artifact.
    • getPlexusUtilsVersion

      Return the version of Plexus Utils used by the XCite Maven plugin.
      Returns:
      The version of Plexus Utils used by the XCite Maven plugin.
    • getPluginManager

      public org.apache.maven.plugin.BuildPluginManager getPluginManager()
      Get the Maven BuildPluginManager object.
      Returns:
      The Maven BuildPluginManager object.
    • getPreSiteCss

      public final File getPreSiteCss()
      Get the CSS file for the pre-site version of the HTML.
      Value: ${project.build.directory}/coredoc.css
      Returns:
      The CSS file.
    • getProject

      public org.apache.maven.project.MavenProject getProject()
      Get the MavenProject object.
      Returns:
      The MavenProject object.
    • getProjectName

      Short name of the project, such as OpenAM, OpenDJ, OpenIDM.
      Returns:
      The short name of the project.
    • getProjectVersion

      Get the project version.
      Returns:
      The project version.
    • getReleaseCss

      public final File getReleaseCss()
      Get the CSS file for the release version of the HTML.
      Value: ${project.build.directory}/dfo.css
      Returns:
      The CSS file.
    • getReleaseDate

      Get the software release date.
      Default: now
      Returns:
      The software release date.
    • getReleaseDirectory

      public final File getReleaseDirectory()
      Get the file system directory for release layout documentation.
      Default: ${project.build.directory}/release
      Returns:
      releaseDirectory
    • getReleaseFaviconLink

      public final String getReleaseFaviconLink()
      Get the favicon link element for the release version of the HTML.
      Returns:
      The link element.
    • getReleaseVersion

      public final String getReleaseVersion()
      Get the version for this release.
      Returns:
      The version for this release.
    • getReleaseVersionPath

      public final String getReleaseVersionPath()
      Get the path to the directory to hold the release version documents, such as ${project.build.directory}/release/1.0.0.
      Returns:
      The path to the release version directory.
    • getRelativeResourcesDirectoryPath

      Path to arbitrary documentation set resources, relative to the modifiable sources directory.
      Default: resources
      Returns:
      The resources directory path, relative to the modifiable sources directory.
    • getResourcesDirectory

      Directory for arbitrary documentation set resources.
      Default: ${basedir}/src/main/docbkx/resources
      Returns:
      The resources directory.
    • runLinkTester

      Whether to run the ForgeRock link tester plugin.
      You only need to run the link test from the top level of a project.
      Default: "true"
      Returns:
      Whether to run the ForgeRock link tester plugin.
    • getSession

      public org.apache.maven.execution.MavenSession getSession()
      Get the MavenSession object.
      Returns:
      The MavenSession object.
    • getSingleHTMLCustomization

      Get the location of the single page HTML XSL stylesheet customization file.
      Value: ${project.build.directory}/docbkx-stylesheets/html/coredoc.xsl
      docbkx-tools element: <htmlCustomization>
      Returns:
      The location of the single-page HTML XSL stylesheet.
    • getSiteDirectory

      public final File getSiteDirectory()
      Get the file system directory for site content.
      Default: ${project.build.directory}/site
      Returns:
      The file system directory for site content.
    • skipLinkCheck

      Whether the ForgeRock link tester plugin should skip checking that external URLs are valid.
      See the skipUrls parameter of the linktester plugin.
      Default: false
      Returns:
      Whether to test that external URLs are valid.
    • getSkipUrlPatterns

      Get regex patterns of URLs to skip when checking external links.
      Default: null
      Returns:
      Regex patterns of URLs to skip when checking external links.
    • doUsePreProcessedSources

      public boolean doUsePreProcessedSources()
      Whether to build from pre-processed DocBook XML sources.

      Default: false

      Returns:
      True if docbkxSourceDirectory contains fully pre-processed sources.
    • useSyntaxHighlighting

      public final String useSyntaxHighlighting()
      Whether <programlisting> content has syntax highlighting.
      Value: 1 (true)
      docbkx-tools element: <highlightSource>
      Returns:
      Where program listings use syntax highlighting.
    • getWebHelpCss

      public final File getWebHelpCss()
      Get the location of the main CSS file for webhelp documents.
      Value: ${project.build.dir}/docbkx-stylesheets/webhelp/positioning.css
      Returns:
      The main CSS file for webhelp documents.
    • getWebHelpCustomization

      public final File getWebHelpCustomization()
      Get the location of the webhelp XSL stylesheet customization file.
      Value: ${project.build.dir}/docbkx-stylesheets/webhelp/coredoc.xsl
      docbkx-tools element: <webhelpCustomization>
      Returns:
      The location of the webhelp XSL stylesheet.
    • getWebHelpLogo

      public final File getWebHelpLogo()
      Get the location of the logo image for webhelp documents.
      Value: ${project.build.dir}/docbkx-stylesheets/webhelp/logo.png
      Returns:
      The logo image for webhelp documents.
    • getXCiteVersion

      Return the version of the XCite Maven plugin to use.
      Returns:
      The version of the XCite Maven plugin to use.
    • getXhtml5Customization

      public final File getXhtml5Customization()
      Location of the XHTML5 XSL stylesheet customization file, relative to the build directory.
      Value: ${project.build.directory}/docbkx-stylesheets/xhtml5/coredoc.xsl
      Default: ${project.build.directory}/docbkx-stylesheets/xhtml5/coredoc.xsl
      docbkx-tools element: <xhtml5Customization>
      Returns:
      The location of the XHTML5 XSL stylesheet.
    • getBootstrapCustomization

      Get the location of the HtmlForBootstrap XSL stylesheet customization file.
      Default: ${project.build.directory}/docbkx-stylesheets/bootstrap/coredoc.xsl
      docbkx-tools element: <bootstrapCustomization>
      Returns:
      The location of the HtmlForBootstrap XSL stylesheet.