org.nuiton.jrst.plugin
Class JRstPlugin

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.nuiton.jrst.plugin.JRstPlugin
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class JRstPlugin
extends org.apache.maven.plugin.AbstractMojo

Transform rst site documentation into xdoc, to be used by maven

RST file have to be located in:

  • src/site/en/rst/
  • src/site/fr/rst/
  • src/site/es/rst/
  • ...
  • and they will be generated in :
  • target/generated-site/xdoc/ (if en is default language)
  • target/generated-site/fr/xdoc/
  • target/generated-site/es/xdoc/
  • ...
  • All other files will be put on target/generated-site in same directory structure. Created: 14 avril 2006

    Version:
    $Revision: 418 $ Last update: $Date: 2009-10-10 19:00:32 +0200 (sam., 10 oct. 2009) $ by : $Author: tchemit $
    Author:
    ruchaud
    Is defined by the goal name:
    jrst
    Is bound to the specified phase of the standard build lifecycle:
    pre-site

    Nested Class Summary
    protected static class JRstPlugin.RessourceUpdater
              An updater for resources files.
    protected static class JRstPlugin.RstUpdater
              An updater for rst files.
     
    Field Summary
    protected static String[] DEFAULT_INCLUDE_RESOURCES
              Default copy patterns if includeResources is null.
    protected  String defaultLocale
              Default locale for generated files structure.
    protected  File directoryIn
              Site source directory.
    protected  File directoryOut
              Site generated directory.
    protected  boolean force
              Overwrite resources.
    protected  boolean ignoreErrors
              Ignore errors.
    protected  String[] includeResources
              Resources patterns to copy.
    protected  String inputEncoding
              Site source encoding.
    protected  int numberFilesGenerates
              Number of generated files.
    protected  String outputEncoding
              Site generated encoding.
    protected  String overwrite
              Overwrite already existing generated files.
    protected  File resourceDirectoryOut
              Copied resource destination directory.
    protected  boolean verbose
              Verbose.
     
    Fields inherited from interface org.apache.maven.plugin.Mojo
    ROLE
     
    Constructor Summary
    JRstPlugin()
               
     
    Method Summary
    protected  void actionCopy()
               
    protected  void actionGenerate()
               
     boolean doAction(File in, File out)
               
     void execute()
              Execute mojo.
     JRST.Overwrite getOverwrite()
              Get overwrite.
     
    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

    DEFAULT_INCLUDE_RESOURCES

    protected static final String[] DEFAULT_INCLUDE_RESOURCES
    Default copy patterns if includeResources is null.


    directoryIn

    protected File directoryIn
    Site source directory.

    Since:
    0.8
    Is defined by:
    default-value:
    src/site

    inputEncoding

    protected String inputEncoding
    Site source encoding.

    Since:
    0.8
    Is defined by:
    default-value:
    ${project.build.sourceEncoding}

    directoryOut

    protected File directoryOut
    Site generated directory.

    Since:
    0.8
    Is defined by:
    default-value:
    target/generated-site

    outputEncoding

    protected String outputEncoding
    Site generated encoding.

    Since:
    0.8
    Is defined by:
    default-value:
    ${project.build.sourceEncoding}

    resourceDirectoryOut

    protected File resourceDirectoryOut
    Copied resource destination directory.

    Since:
    0.8
    Is defined by:
    default-value:
    target/generated-site/resources

    ignoreErrors

    protected boolean ignoreErrors
    Ignore errors.

    Since:
    0.8
    Is defined by:
    default-value:
    true

    overwrite

    protected String overwrite
    Overwrite already existing generated files.

    Since:
    0.8
    Is defined by:
    default-value:
    ifnewer

    defaultLocale

    protected String defaultLocale
    Default locale for generated files structure.

    Since:
    0.8
    Is defined by:
    default-value:
    en

    verbose

    protected boolean verbose
    Verbose.

    Since:
    0.8
    Is defined by:
    expression:
    ${jrst.verbose}
    default-value:
    ${maven.verbose}

    force

    protected boolean force
    Overwrite resources.

    Since:
    0.8
    Is defined by:
    expression:
    ${jrst.force}
    default-value:
    false

    includeResources

    protected String[] includeResources
    Resources patterns to copy.

    Since:
    0.8.3
    Is defined by:
    expression:
    ${jrst.includeResources}

    numberFilesGenerates

    protected int numberFilesGenerates
    Number of generated files.

    Constructor Detail

    JRstPlugin

    public JRstPlugin()
    Method Detail

    getOverwrite

    public JRST.Overwrite getOverwrite()
    Get overwrite.

    Returns:
    the overwrite
    See Also:
    JRST.Overwrite

    execute

    public void execute()
                 throws org.apache.maven.plugin.MojoExecutionException
    Execute mojo.

    Throws:
    org.apache.maven.plugin.MojoExecutionException

    actionGenerate

    protected void actionGenerate()

    doAction

    public boolean doAction(File in,
                            File out)

    actionCopy

    protected void actionCopy()


    Copyright © 2006-2010 CodeLutin. All Rights Reserved.