org.jboss.maven.plugins.jdocbook
Class AbstractDocBookMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.jboss.maven.plugins.jdocbook.AbstractDocBookMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
GenerationMojo, PackageMojo, ResourceMojo, TranslationDiffReport

public abstract class AbstractDocBookMojo
extends org.apache.maven.plugin.AbstractMojo

Basic support for the various DocBook mojos in this package. Mainly, we are defining common configuration attributes of the packaging.

todo : I'd much prefer to see the "partial artifact coord" stuff go away and use custom package types to convey this information. This frees the user from duplicate entry of the information.

Author:
Steve Ebersole

Nested Class Summary
protected static interface AbstractDocBookMojo.ArtifactProcessor
           
 
Field Summary
protected  org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
          INTERNAL : used to get reference to environemtn Archiver/UnArchiver.
protected  java.io.File cssDirectory
          The directory containing local css
protected  java.lang.String fontConfig
          The relative path font configuration to use.
protected  java.io.File fontsDirectory
          The directory containing local fonts
protected  Format[] formats
          The formats in which to perform rendering.
protected  java.io.File imagesDirectory
          The directory containing local images
protected  java.lang.String masterTranslationArtifactId
          The artifactId of the master translation (unless, of course, this is the master translation).
protected  java.io.File masterTranslationFile
          Local path to the master translation to use for diff reporting.
protected  Options options
          Configurable options
static java.lang.String PLUGIN_NAME
           
protected  java.util.List pluginArtifacts
          INTERNAL : The artifacts associated to the dependencies defined as part of our configuration within the project to which we are being attached.
protected  org.apache.maven.project.MavenProject project
          INTERNAL : The project being built
protected  java.util.Set projectArtifacts
          INTERNAL : The artifacts associated with the dependencies defined as part of the project to which we are being attached.
protected  org.apache.maven.project.MavenProjectHelper projectHelper
          INTERNAL : used during packaging to attach produced artifacts
protected  org.apache.maven.doxia.siterenderer.Renderer siteRenderer
          INTERNAL : used in the translation diff report
protected  java.io.File sourceDirectory
          The directory where the sources are located.
protected  java.lang.String sourceDocumentName
          The name of the document (relative to sourceDirectory) which is the document to be rendered.
protected  java.io.File stagingDirectory
          The directory where "docbook resource" staging occurs.
protected  java.io.File targetDirectory
          The directory where the output will be written.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractDocBookMojo()
           
 
Method Summary
 void execute()
           
protected abstract  void process(Formatting[] formattings)
          The override method to perform the actual processing of the mojo.
protected  void processArtifacts(AbstractDocBookMojo.ArtifactProcessor processor)
           
protected  void processPluginArtifacts(AbstractDocBookMojo.ArtifactProcessor processor)
           
protected  void processProjectArtifacts(AbstractDocBookMojo.ArtifactProcessor processor)
           
 
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
 

Field Detail

PLUGIN_NAME

public static final java.lang.String PLUGIN_NAME
See Also:
Constant Field Values

project

protected org.apache.maven.project.MavenProject project
INTERNAL : The project being built


projectArtifacts

protected java.util.Set projectArtifacts
INTERNAL : The artifacts associated with the dependencies defined as part of the project to which we are being attached.


pluginArtifacts

protected java.util.List pluginArtifacts
INTERNAL : The artifacts associated to the dependencies defined as part of our configuration within the project to which we are being attached.


archiverManager

protected org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
INTERNAL : used to get reference to environemtn Archiver/UnArchiver.


siteRenderer

protected org.apache.maven.doxia.siterenderer.Renderer siteRenderer
INTERNAL : used in the translation diff report


projectHelper

protected org.apache.maven.project.MavenProjectHelper projectHelper
INTERNAL : used during packaging to attach produced artifacts


sourceDocumentName

protected java.lang.String sourceDocumentName
The name of the document (relative to sourceDirectory) which is the document to be rendered.


sourceDirectory

protected java.io.File sourceDirectory
The directory where the sources are located.


imagesDirectory

protected java.io.File imagesDirectory
The directory containing local images


cssDirectory

protected java.io.File cssDirectory
The directory containing local css


fontsDirectory

protected java.io.File fontsDirectory
The directory containing local fonts


targetDirectory

protected java.io.File targetDirectory
The directory where the output will be written.


stagingDirectory

protected java.io.File stagingDirectory
The directory where "docbook resource" staging occurs. Mainly this is used for (1) image/css staging for html-based output; (2) base directory for value of img.src.path DocBook XSLT parameter for fop-based formattings.


formats

protected Format[] formats
The formats in which to perform rendering.


masterTranslationArtifactId

protected java.lang.String masterTranslationArtifactId
The artifactId of the master translation (unless, of course, this is the master translation). It is assumed that the master translation:
  1. is part of the same groupId
  2. has its source defined as a dependency (classifier = source)


masterTranslationFile

protected java.io.File masterTranslationFile
Local path to the master translation to use for diff reporting.


fontConfig

protected java.lang.String fontConfig
The relative path font configuration to use.


options

protected Options options
Configurable options

Constructor Detail

AbstractDocBookMojo

public AbstractDocBookMojo()
Method Detail

process

protected abstract void process(Formatting[] formattings)
                         throws RenderingException,
                                XSLTException
The override method to perform the actual processing of the mojo.

Parameters:
formattings - The fomattings configured for render
Throws:
RenderingException - Indicates problem performing rendering
XSLTException - Indicates problem building or executing XSLT transformer

execute

public final void execute()
                   throws org.apache.maven.plugin.MojoExecutionException,
                          org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

processArtifacts

protected void processArtifacts(AbstractDocBookMojo.ArtifactProcessor processor)

processProjectArtifacts

protected void processProjectArtifacts(AbstractDocBookMojo.ArtifactProcessor processor)

processPluginArtifacts

protected void processPluginArtifacts(AbstractDocBookMojo.ArtifactProcessor processor)


Copyright © 2007 JBoss, a division of Red Hat, Inc. All Rights Reserved.