org.nuiton.jaxx.plugin
Class GenerateHelpSearchMojo

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.AbstractGenerateHelpMojo
                  extended by org.nuiton.jaxx.plugin.GenerateHelpSearchMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.nuiton.plugin.Plugin

public class GenerateHelpSearchMojo
extends AbstractGenerateHelpMojo

Generate the javax search index help for your project.

The current files should be generated always in a generated directory and not in your src directories (this is mainly binary files not to be stored in scm system)...

Since:
2.0.0
Author:
chemit
Is defined to be executed in:
goal:
generate-help-files
Is defined by the goal name:
generate-help-search
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.InitState, org.nuiton.plugin.Plugin.Packaging
 
Field Summary
protected  File inputHelp
          The directory where to pick content files to generate the index.
protected  File outputHelpSearch
          The directory where to create or update help search index files.
protected  String timestamp
           
 
Fields inherited from class org.nuiton.jaxx.plugin.AbstractGenerateHelpMojo
generateSearch, locales
 
Fields inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
generateHelp
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
GenerateHelpSearchMojo()
           
 
Method Summary
protected  boolean checkSkip()
           
protected  void doActionForLocale(Locale locale, boolean isDefaultLocale, File localizedTarget, String localePath)
          Do the action for the given locale.
protected  void generateSearchIndex(File source, File target, Locale locale)
           
 File getTargetDirectory()
           
 void init()
           
protected  void postDoAction()
          Call back after doing all stuff for all locales declared
 void setTargetDirectory(File targetDirectory)
           
 
Methods inherited from class org.nuiton.jaxx.plugin.AbstractGenerateHelpMojo
cleanHelpIdsStore, doAction, getHelpIdsFilename, getHelpIdsStoreFile, getMergeHelpIdsFilename, getMergeHelpIdsStoreFile, getOutputHelpIds, loadHelpIds, removeQuote, setHelpIdsFilename, setMergeHelpIdsFilename, setOutputHelpIds, storeHelpIds
 
Methods inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
checkPackaging, getEncoding, getLastModified, getProject, isForce, isVerbose, setEncoding, setForce, setProject, setVerbose
 
Methods inherited from class org.nuiton.plugin.AbstractPlugin
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getTemplate, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, 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

outputHelpSearch

protected File outputHelpSearch
The directory where to create or update help search index files.

Since:
2.0.0
Is defined by:
expression:
${jaxx.outputHelpSearch}
default-value:
${project.basedir}/target/generated-sources/help
Is required.

inputHelp

protected File inputHelp
The directory where to pick content files to generate the index.

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

timestamp

protected String timestamp
Constructor Detail

GenerateHelpSearchMojo

public GenerateHelpSearchMojo()
Method Detail

init

public void init()
          throws Exception
Overrides:
init in class AbstractGenerateHelpMojo
Throws:
Exception

getTargetDirectory

public File getTargetDirectory()
Specified by:
getTargetDirectory in class AbstractJaxxMojo

setTargetDirectory

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

checkSkip

protected boolean checkSkip()
Overrides:
checkSkip in class AbstractGenerateHelpMojo

doActionForLocale

protected void doActionForLocale(Locale locale,
                                 boolean isDefaultLocale,
                                 File localizedTarget,
                                 String localePath)
                          throws Exception
Description copied from class: AbstractGenerateHelpMojo
Do the action for the given locale.

Specified by:
doActionForLocale in class AbstractGenerateHelpMojo
Parameters:
locale - the locale to treate
isDefaultLocale - true if given locale is de the default locale
localizedTarget - where are stored help files for the given locale
localePath - the locale path to use (is default if given locale is default).
Throws:
Exception - if any pb

postDoAction

protected void postDoAction()
Description copied from class: AbstractGenerateHelpMojo
Call back after doing all stuff for all locales declared

Specified by:
postDoAction in class AbstractGenerateHelpMojo

generateSearchIndex

protected void generateSearchIndex(File source,
                                   File target,
                                   Locale locale)
                            throws Exception
Throws:
Exception


Copyright © 2008-2010 CodeLutin. All Rights Reserved.