org.nuiton.jaxx.plugin
Class GenerateHelpMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.nuiton.plugin.AbstractPlugin
          extended by org.nuiton.jaxx.plugin.AbstractJaxxMojo
              extended by org.nuiton.jaxx.plugin.GenerateHelpMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.nuiton.plugin.Plugin

public class GenerateHelpMojo
extends AbstractJaxxMojo

Mojo to generate javax help stuff for your project. HelpIds should have been discovered by the JaxxMojo.

Since:
1.3
Author:
chemit
Is defined by the goal name:
generate-help
Is bound to the specified phase of the standard build lifecycle:
process-sources
Requires the dependencies in this specified scope:
compile
Requires a Maven project to run:
true

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin
org.nuiton.plugin.Plugin.Packaging
 
Field Summary
protected  java.io.File contentTemplate
          The template used to generate helpset content file.
protected  boolean generateSearch
          Flag to generate the search index.
protected  java.lang.String helpsetName
          The name of the helpset to generate.
protected  java.io.File helpsetTemplate
          The template used to generate helpset file.
protected  java.io.File indexTemplate
          The template used to generate helpset index file.
protected  java.lang.String locales
          The locales to generate for help, seprated by comma.
protected  java.io.File mapTemplate
          The template used to generate helpset map file.
protected  java.io.File outHelp
          The directory where to generate help files.
protected  java.io.File tocTemplate
          The template used to generate helpset toc file.
 
Fields inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
encoding, helpIdsStore, project, verbose
 
Fields inherited from class org.nuiton.plugin.AbstractPlugin
skipAfterInitMessage
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
GenerateHelpMojo()
           
 
Method Summary
 void doAction()
           
protected  void doGen(java.io.File template, java.io.File f, java.util.Properties env)
           
protected  int generateContentFiles(java.io.File localizedTarget, java.util.Properties env, java.lang.String localePath)
           
protected  boolean generateHelpsetFile(java.io.File file, java.util.Properties env)
           
protected  NodeItem generateIndexFile(java.io.File file, java.util.Properties env)
           
protected  java.util.Properties generateMapFile(java.io.File file, java.util.Properties env)
           
protected  void generateSearchIndex(java.io.File localizedTarget, java.util.Locale locale)
           
protected  NodeItem generateTocFile(java.io.File file, java.util.Properties env)
           
 java.io.File getTargetDirectory()
           
 boolean init()
           
protected  org.nuiton.plugin.VelocityTemplateGenerator prepareGenerator(java.io.File template)
           
 void setTargetDirectory(java.io.File targetDirectory)
           
 
Methods inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
checkPackaging, getEncoding, getHelpIdsStore, getProject, isVerbose, setEncoding, setHelpIdsStore, setProject, setVerbose
 
Methods inherited from class org.nuiton.plugin.AbstractPlugin
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, checkResource, checkRunOnceDone, copyFile, execute, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getTemplate, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, writeFile
 
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
getLog, setLog
 

Field Detail

outHelp

protected java.io.File outHelp
The directory where to generate help files.

Since:
1.3
Is defined by:
expression:
${jaxx.outHelp}
default-value:
${project.basedir}/src/main/help
Is required.

locales

protected java.lang.String locales
The locales to generate for help, seprated by comma. The first locale given is the default locale.

Since:
2.0.0
Is defined by:
expression:
${jaxx.locales}
Is required.

helpsetName

protected java.lang.String helpsetName
The name of the helpset to generate.

Since:
1.3
Is defined by:
expression:
${jaxx.helpsetName}
default-value:
${project.artifactId}
Is required.

helpsetTemplate

protected java.io.File helpsetTemplate
The template used to generate helpset file. Must be an existing file or a ressource in class-path

Since:
1.3
Is defined by:
expression:
${jaxx.helpsetTemplate}
default-value:
/defaultHelpSet.hs.vm
Is required.

mapTemplate

protected java.io.File mapTemplate
The template used to generate helpset map file. Must be an existing file or a ressource in class-path

Since:
1.3
Is defined by:
expression:
${jaxx.mapTemplate}
default-value:
/defaultMap.jhm.vm
Is required.

indexTemplate

protected java.io.File indexTemplate
The template used to generate helpset index file. Must be an existing file or a ressource in class-path

Since:
1.3
Is defined by:
expression:
${jaxx.indexTemplate}
default-value:
/defaultIndex.xml.vm
Is required.

tocTemplate

protected java.io.File tocTemplate
The template used to generate helpset toc file. Must be an existing file or a ressource in class-path

Since:
1.3
Is defined by:
expression:
${jaxx.tocTemplate}
default-value:
/defaultToc.xml.vm
Is required.

contentTemplate

protected java.io.File contentTemplate
The template used to generate helpset content file. Must be an existing file or a ressource in class-path

Since:
1.3
Is defined by:
expression:
${jaxx.contentTemplate}
default-value:
/defaultContent.html.vm
Is required.

generateSearch

protected boolean generateSearch
Flag to generate the search index.

Since:
1.3
Is defined by:
expression:
${jaxx.generateSearch}
default-value:
true
Is required.
Constructor Detail

GenerateHelpMojo

public GenerateHelpMojo()
Method Detail

init

public boolean init()
             throws java.lang.Exception
Specified by:
init in class org.nuiton.plugin.AbstractPlugin
Throws:
java.lang.Exception

doAction

public void doAction()
              throws java.lang.Exception
Specified by:
doAction in class org.nuiton.plugin.AbstractPlugin
Throws:
java.lang.Exception

getTargetDirectory

public java.io.File getTargetDirectory()
Specified by:
getTargetDirectory in class AbstractJaxxMojo

setTargetDirectory

public void setTargetDirectory(java.io.File targetDirectory)
Specified by:
setTargetDirectory in class AbstractJaxxMojo

generateContentFiles

protected int generateContentFiles(java.io.File localizedTarget,
                                   java.util.Properties env,
                                   java.lang.String localePath)
                            throws java.lang.Exception
Throws:
java.lang.Exception

generateHelpsetFile

protected boolean generateHelpsetFile(java.io.File file,
                                      java.util.Properties env)
                               throws java.lang.Exception
Throws:
java.lang.Exception

generateMapFile

protected java.util.Properties generateMapFile(java.io.File file,
                                               java.util.Properties env)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

generateIndexFile

protected NodeItem generateIndexFile(java.io.File file,
                                     java.util.Properties env)
                              throws java.lang.Exception
Throws:
java.lang.Exception

generateSearchIndex

protected void generateSearchIndex(java.io.File localizedTarget,
                                   java.util.Locale locale)
                            throws java.lang.IllegalArgumentException,
                                   java.io.IOException,
                                   java.lang.reflect.InvocationTargetException,
                                   java.lang.SecurityException,
                                   java.lang.IllegalAccessException,
                                   java.lang.NoSuchMethodException
Throws:
java.lang.IllegalArgumentException
java.io.IOException
java.lang.reflect.InvocationTargetException
java.lang.SecurityException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException

generateTocFile

protected NodeItem generateTocFile(java.io.File file,
                                   java.util.Properties env)
                            throws java.lang.Exception
Throws:
java.lang.Exception

doGen

protected void doGen(java.io.File template,
                     java.io.File f,
                     java.util.Properties env)
              throws java.lang.Exception
Throws:
java.lang.Exception

prepareGenerator

protected org.nuiton.plugin.VelocityTemplateGenerator prepareGenerator(java.io.File template)
                                                                throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2008-2009 CodeLutin. All Rights Reserved.