Package org.forgerock.doc.maven
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
AbstractMojo implementation for building core documentation from DocBook XML
using docbkx-tools.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Supported output formats.static enum
Supported DocBook profile attributes. -
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Whether sections should have numeric labels.final boolean
Whether to build a .zip containing the release content.boolean
Whether to copy resource files alongside docs for site, release.boolean
Whether to build artifacts from pre-processed sources.final String
Whether section labels should include parent numbers, like 1.1, 1.2, 1.2.1, 1.2.2.boolean
Whether to overwrite the copy of DocBook sources if it exists.boolean
Whether to overwrite project files with shared content.boolean
Whether to build from pre-processed DocBook XML sources.Get the doc artifacts to unpack when preparing Backstage layout.Get the base directory for Asciidoc source files.Returns the version of the Asciidoctor Maven plugin to use.Get the file system directory for Backstage layout output.Get the product name as shown on Backstage.ArrayList<org.twdata.maven.mojoexecutor.MojoExecutor.Element>
Get the base configuration applicable to all builds with the docbkx-tools plugin.Project base directory, needed to workaround bugs with *target.db and webhelp.final File
Get the location of the HtmlForBootstrap XSL stylesheet customization file.Gets the branding artifactId to use.Gets the groupId of the branding artifact to use.Gets the version of the branding artifact to use.Get the project build directory for this plugin.final File
Get the location of the chunked HTML XSL stylesheet customization file.Get theartifactId
of the common content artifact.Get thegroupId
of the common content artifact.Get the version of the common content artifact to use.Get the base directory for the modifiable copy of DocBook XML source files.Base directory for built documentation.Get the base directory for DocBook XML source files.Get the docbkx-tools plugin version to use.Get document names for the current project.Get the URL to the site for published documentation.Get the top-level DocBook XML source document name.final String
For draft mode, URL to the background watermark image.Get the URL to JSON object showing EOSL versions for each project.final File
Get the location of the EPUB XSL stylesheet customization file.Returns a map of DocBook profile settings to exclude elements.final String
Get the favicon link element for the pre-site version of the HTML.final File
Get the location of the FO XSL stylesheet customization file (for PDF, RTF).final File
Directory where fonts and font metrics are stored.Get the version of the FOP hyphenation plugin to use.final String
Log level when building FO output (PDF, RTF).Return a list of output formats to generate.Google Analytics identifier for the project.Returns a map of DocBook profile settings to include elements.Get the main JavaScript file name, found under/js/
in plugin resources.Get the source paths where cited Java files are found.Get the JCite artifact version to use for Java code citations.Get the URL to JSON object showing latest versions for each project.ForgeRock link tester plugin version to use.Get the Locale tag for the documentation set.final File
Get the location of the man page XSL stylesheet customization file.Get the version of the Maven dependency plugin to use.Get the version of the Maven dependency plugin to use.Get the version of the Maven filtering library to use.Get the Maven resources plugin version.int
Get maximum height for PNG images used in PDF, in inches.Get the version of the PlantUML artifact.Return the version of Plexus Utils used by the XCite Maven plugin.org.apache.maven.plugin.BuildPluginManager
Get the MavenBuildPluginManager
object.final File
Get the CSS file for the pre-site version of the HTML.org.apache.maven.project.MavenProject
Get theMavenProject
object.Short name of the project, such as OpenAM, OpenDJ, OpenIDM.Get the project version.Path to arbitrary documentation set resources, relative to the modifiable sources directory.final File
Get the CSS file for the release version of the HTML.Get the software release date.final File
Get the file system directory for release layout documentation.final String
Get the favicon link element for the release version of the HTML.final String
Get the version for this release.final String
Get the path to the directory to hold the release version documents, such as${project.build.directory}/release/1.0.0
.Directory for arbitrary documentation set resources.org.apache.maven.execution.MavenSession
Get theMavenSession
object.final File
Get the location of the single page HTML XSL stylesheet customization file.final File
Get the file system directory for site content.String[]
Get regex patterns of URLs to skip when checking external links.final File
Get the location of the main CSS file for webhelp documents.final File
Get the location of the webhelp XSL stylesheet customization file.final File
Get the location of the logo image for webhelp documents.Return the version of the XCite Maven plugin to use.final File
Location of the XHTML5 XSL stylesheet customization file, relative to the build directory.final String
Whether these are draft documents, rather than final documents.final String
Whether documents should be allowed to include other documents.boolean
Whether to keep a custom index.html file for the documentation set.Get path name in UNIX format.Whether to run the ForgeRock link tester plugin.Whether the ForgeRock link tester plugin should skip checking that external URLs are valid.final String
useAnsi()
Whether to use WinAnsi encoding for embedded fonts.final String
Whether <programlisting> content has syntax highlighting.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Constructor Details
-
AbstractDocbkxMojo
public AbstractDocbkxMojo()
-
-
Method Details
-
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
Get the base configuration applicable to all builds with the docbkx-tools plugin.- Returns:
- The configuration applicable to all builds.
-
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
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 theartifactId
of the common content artifact.
Default:doc-common-content
.- Returns:
- The
artifactId
of the common content artifact.
-
getCommonContentGroupId
Get thegroupId
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
Whether to copy resource files alongside docs for site, release.
Default: false- Returns:
- true if resource files should be copied.
-
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
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
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 itix.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
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
Get the URL to JSON object showing EOSL versions for each project.- Returns:
- The URL to the JSON object.
-
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
Get the favicon link element for the pre-site version of the HTML.- Returns:
- The link element.
-
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
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
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
Whether these are draft documents, rather than final documents.
Default:yes
docbkx-tools element: <draftMode>- Returns:
- Whether these are draft documents.
-
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
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
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
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 thedocbkxModifiableSourcesDirectory
, then you can set this tofalse
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.
-
path
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
Get the MavenBuildPluginManager
object.- Returns:
- The Maven
BuildPluginManager
object.
-
getPreSiteCss
Get the CSS file for the pre-site version of the HTML.
Value:${project.build.directory}/coredoc.css
- Returns:
- The CSS file.
-
getProject
Get theMavenProject
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
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
Get the file system directory for release layout documentation.
Default:${project.build.directory}/release
- Returns:
releaseDirectory
-
getReleaseFaviconLink
Get the favicon link element for the release version of the HTML.- Returns:
- The link element.
-
getReleaseVersion
Get the version for this release.- Returns:
- The version for this release.
-
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
Get theMavenSession
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
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 theskipUrls
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
Whether to build from pre-processed DocBook XML sources.Default:
false
- Returns:
- True if
docbkxSourceDirectory
contains fully pre-processed sources.
-
useSyntaxHighlighting
Whether <programlisting> content has syntax highlighting.
Value:1
(true)
docbkx-tools element: <highlightSource>- Returns:
- Where program listings use syntax highlighting.
-
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
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
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
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.
-