jDocBook Maven Plugin 2.3.7

org.jboss.maven.plugins.jdocbook
Class AbstractDocBookMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.jboss.maven.plugins.jdocbook.MojoInternalConfigSupport
          extended by org.jboss.maven.plugins.jdocbook.AbstractDocBookMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, DirectoryLayout.BaseInfo
Direct Known Subclasses:
CleanPoMojo, CleanPotMojo, GenerateXslFoMojo, GenerationMojo, PackageMojo, ResourceMojo, TranslationMojo, UpdatePoMojo, UpdatePotMojo

public abstract class AbstractDocBookMojo
extends MojoInternalConfigSupport
implements DirectoryLayout.BaseInfo

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

Author:
Steve Ebersole

Nested Class Summary
protected  class AbstractDocBookMojo.PublishingSource
           
 
Field Summary
protected  boolean attach
          Whether or not to perform the attching of the format outputs as classified attachments.
protected  File baseOutputDirectory
          The base directory where output will be written.
protected  org.apache.maven.model.Resource cssResource
          A Resource describing project-local css.
protected  DirectoryLayout directoryLayout
           
protected  File fontsDirectory
          The directory containing local fonts
protected  Format[] formats
          The formats in which to perform rendering.
protected  boolean ignoreTranslations
          Should we ignore translations?
protected  org.apache.maven.model.Resource imageResource
          A Resource describing project-local images.
protected  Injection[] injections
          The injection entities.
protected  String masterTranslation
          The locale of the master translation.
protected  Options options
          Configurable options
static String PLUGIN_NAME
           
protected  Profiling profiling
          Profiling configuration
protected  File sourceDirectory
          The directory where the sources are located.
protected  String sourceDocumentName
          The name of the document (relative to sourceDirectory) which is the document to be rendered.
protected  String[] translations
          The locales of all non-master translations.
 
Fields inherited from class org.jboss.maven.plugins.jdocbook.MojoInternalConfigSupport
archiverManager, artifactCollector, artifactMetadataSource, artifactResolver, localRepository, pluginArtifacts, project, projectArtifacts, session, settings
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractDocBookMojo()
           
 
Method Summary
protected  List<org.apache.maven.artifact.Artifact> collectArtifactsByType(String type, boolean transitivesFirst)
           
protected  void doExecute()
           
 void execute()
          
 Locale fromLanguageString(String languageStr)
           
 File getBaseOutputDirectory()
           
 File getBaseSourceDirectory()
           
protected  org.jboss.jdocbook.JDocBookComponentRegistry getComponentRegistry()
           
 File[] getFontDirectories()
           
protected  Format getFormatOptions(String name)
           
protected  List<Format> getFormatOptionsList()
           
 String getMasterLanguage()
           
 org.jboss.maven.plugins.jdocbook.AbstractDocBookMojo.MasterLanguageDescriptorImpl getMasterLanguageDescriptor()
           
protected  Locale getMasterLanguageLocale()
           
protected  File getProfiledDocument(Locale languageLocale)
           
protected  File getProfiledDocument(String language)
           
protected  String getRequestedFormat()
           
protected  Locale getRequestedLanguageLocale()
           
protected  File getRootMasterSourceFile()
           
protected  File getSourceDocument(Locale languageLocale)
           
protected  File getSourceDocument(String language)
           
 List<org.jboss.jdocbook.translate.TranslationSource> getTranslationSources(boolean excludeIgnoredTranslations)
           
protected  Locale parseLocale(String locale)
           
protected  void process()
          The override method to perform the actual processing of the mojo.
protected  List<AbstractDocBookMojo.PublishingSource> resolvePublishingSources()
           
protected  String stringify(Locale locale)
           
 
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 String PLUGIN_NAME
See Also:
Constant Field Values

sourceDocumentName

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


sourceDirectory

protected File sourceDirectory
The directory where the sources are located.


baseOutputDirectory

protected File baseOutputDirectory
The base directory where output will be written.


imageResource

protected org.apache.maven.model.Resource imageResource
A Resource describing project-local images.


cssResource

protected org.apache.maven.model.Resource cssResource
A Resource describing project-local css.


fontsDirectory

protected File fontsDirectory
The directory containing local fonts


formats

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


attach

protected boolean attach
Whether or not to perform the attching of the format outputs as classified attachments.


profiling

protected Profiling profiling
Profiling configuration


options

protected Options options
Configurable options


injections

protected Injection[] injections
The injection entities.


ignoreTranslations

protected boolean ignoreTranslations
Should we ignore translations? This is useful for temporarily suspending processing of translations from a profile or other environment specific means. Note that this setting only affects the docbook processing phases, not the PO/POT management goals.


masterTranslation

protected String masterTranslation
The locale of the master translation.


translations

protected String[] translations
The locales of all non-master translations.


directoryLayout

protected final DirectoryLayout directoryLayout
Constructor Detail

AbstractDocBookMojo

public AbstractDocBookMojo()
Method Detail

getBaseSourceDirectory

public File getBaseSourceDirectory()
Specified by:
getBaseSourceDirectory in interface DirectoryLayout.BaseInfo

getBaseOutputDirectory

public File getBaseOutputDirectory()
Specified by:
getBaseOutputDirectory in interface DirectoryLayout.BaseInfo

process

protected void process()
                throws org.jboss.jdocbook.JDocBookProcessException
The override method to perform the actual processing of the mojo.

Throws:
org.jboss.jdocbook.render.RenderingException - Indicates problem performing rendering
org.jboss.jdocbook.xslt.XSLTException - Indicates problem building or executing XSLT transformer
org.jboss.jdocbook.JDocBookProcessException

execute

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

Specified by:
execute in interface org.apache.maven.plugin.Mojo
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

doExecute

protected void doExecute()
                  throws org.jboss.jdocbook.JDocBookProcessException
Throws:
org.jboss.jdocbook.JDocBookProcessException

getRequestedFormat

protected String getRequestedFormat()

getRequestedLanguageLocale

protected Locale getRequestedLanguageLocale()

getFontDirectories

public File[] getFontDirectories()

collectArtifactsByType

protected List<org.apache.maven.artifact.Artifact> collectArtifactsByType(String type,
                                                                          boolean transitivesFirst)

parseLocale

protected Locale parseLocale(String locale)

stringify

protected String stringify(Locale locale)

getMasterLanguage

public String getMasterLanguage()
Specified by:
getMasterLanguage in interface DirectoryLayout.BaseInfo

getMasterLanguageLocale

protected Locale getMasterLanguageLocale()

getRootMasterSourceFile

protected File getRootMasterSourceFile()

getSourceDocument

protected File getSourceDocument(Locale languageLocale)

getSourceDocument

protected File getSourceDocument(String language)

getProfiledDocument

protected File getProfiledDocument(Locale languageLocale)

getProfiledDocument

protected File getProfiledDocument(String language)

getFormatOptionsList

protected List<Format> getFormatOptionsList()

getFormatOptions

protected Format getFormatOptions(String name)

resolvePublishingSources

protected List<AbstractDocBookMojo.PublishingSource> resolvePublishingSources()

getComponentRegistry

protected org.jboss.jdocbook.JDocBookComponentRegistry getComponentRegistry()

getMasterLanguageDescriptor

public org.jboss.maven.plugins.jdocbook.AbstractDocBookMojo.MasterLanguageDescriptorImpl getMasterLanguageDescriptor()

getTranslationSources

public List<org.jboss.jdocbook.translate.TranslationSource> getTranslationSources(boolean excludeIgnoredTranslations)

fromLanguageString

public Locale fromLanguageString(String languageStr)

jDocBook Maven Plugin 2.3.7

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