Package org.nuiton.jaxx.plugin
Class GenerateHelpSearchMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.nuiton.plugin.AbstractPlugin
-
- org.nuiton.jaxx.plugin.AbstractJaxxMojo
-
- org.nuiton.jaxx.plugin.AbstractGenerateHelpMojo
-
- org.nuiton.jaxx.plugin.GenerateHelpSearchMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo,org.nuiton.plugin.Plugin,org.nuiton.plugin.PluginWithEncoding
@Mojo(name="generate-help-search", defaultPhase=PROCESS_SOURCES, requiresProject=true, requiresDependencyResolution=COMPILE) @Execute(goal="generate-help-files") public class GenerateHelpSearchMojo extends AbstractGenerateHelpMojoGenerate 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:
- Tony Chemit - dev@tchemit.fr
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
AbstractJaxxMojo.JaxxFileUpdater
-
-
Field Summary
Fields Modifier and Type Field Description protected FileinputHelpThe directory where to pick content files to generate the index.protected FileoutputHelpSearchThe directory where to create or update help search index files.protected Stringtimestamp-
Fields inherited from class org.nuiton.jaxx.plugin.AbstractGenerateHelpMojo
generateSearch, locales
-
Fields inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
generateHelp
-
-
Constructor Summary
Constructors Constructor Description GenerateHelpSearchMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckSkip()protected voiddoActionForLocale(Locale locale, boolean isDefaultLocale, File localizedTarget, String localePath)Do the action for the given locale.protected voidgenerateSearchIndex(File source, File target, Locale locale)FilegetTargetDirectory()voidinit()protected voidpostDoAction()Call back after doing all stuff for all locales declaredprotected voidpreDoAction()Call back before doing all stuff for all locales declaredvoidsetTargetDirectory(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, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkEncoding, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, needInvoke, needInvoke, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFile
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
outputHelpSearch
@Parameter(property="jaxx.outputHelpSearch", defaultValue="${project.basedir}/target/generated-sources/help", required=true) protected File outputHelpSearchThe directory where to create or update help search index files.- Since:
- 2.0.0
-
inputHelp
@Parameter(property="jaxx.inputHelp", defaultValue="${project.basedir}/src/main/help", required=true) protected File inputHelpThe directory where to pick content files to generate the index.- Since:
- 2.0.0
-
timestamp
protected String timestamp
-
-
Method Detail
-
init
public void init() throws Exception- Overrides:
initin classAbstractGenerateHelpMojo- Throws:
Exception
-
getTargetDirectory
public File getTargetDirectory()
- Specified by:
getTargetDirectoryin classAbstractJaxxMojo
-
setTargetDirectory
public void setTargetDirectory(File targetDirectory)
- Specified by:
setTargetDirectoryin classAbstractJaxxMojo
-
checkSkip
protected boolean checkSkip()
- Overrides:
checkSkipin classAbstractGenerateHelpMojo
-
doActionForLocale
protected void doActionForLocale(Locale locale, boolean isDefaultLocale, File localizedTarget, String localePath) throws Exception
Description copied from class:AbstractGenerateHelpMojoDo the action for the given locale.- Specified by:
doActionForLocalein classAbstractGenerateHelpMojo- Parameters:
locale- the locale to treateisDefaultLocale-trueif given locale is de the default localelocalizedTarget- where are stored help files for the given localelocalePath- the locale path to use (isdefaultif given locale is default).- Throws:
Exception- if any pb
-
preDoAction
protected void preDoAction()
Description copied from class:AbstractGenerateHelpMojoCall back before doing all stuff for all locales declared- Specified by:
preDoActionin classAbstractGenerateHelpMojo
-
postDoAction
protected void postDoAction()
Description copied from class:AbstractGenerateHelpMojoCall back after doing all stuff for all locales declared- Specified by:
postDoActionin classAbstractGenerateHelpMojo
-
-