Package org.nuiton.jaxx.plugin
Class GenerateHelpIdsMojo
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.GenerateHelpIdsMojo
- 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-ids",
defaultPhase=PROCESS_SOURCES,
requiresProject=true)
public class GenerateHelpIdsMojo
extends AbstractGenerateHelpMojo
Generate the help ids files from the previous jaxx generation.
Created: 22 déc. 2009
- Since:
- 2.0.0
- Author:
- Tony Chemit - chemit@codelutin.com
-
Nested Class Summary
Nested classes/interfaces inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
AbstractJaxxMojo.JaxxFileUpdaterNested classes/interfaces inherited from interface org.nuiton.plugin.Plugin
org.nuiton.plugin.Plugin.InitState, org.nuiton.plugin.Plugin.Packaging -
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<java.lang.String>helpIdshelp ids to react.static java.lang.StringINPUT_FILENAME_FORMATstatic java.lang.StringINPUT_FILENAME_FULL_FORMATprotected java.io.FileinputHelpDirectoryDirectory where to merge (create) input files.protected java.lang.StringinputHelpFilenamePrefixPrefix of input files.protected booleanmergeIdsToInputFlag to merge ids into input directory.protected booleanstrictModeFlag to remove obsolete ids into input files.Fields inherited from class org.nuiton.jaxx.plugin.AbstractGenerateHelpMojo
generateSearch, localesFields inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
generateHelpFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors Constructor Description GenerateHelpIdsMojo() -
Method Summary
Modifier and Type Method Description protected booleancheckSkip()protected voiddoActionForLocale(java.util.Locale locale, boolean isDefaultLocale, java.io.File source, java.lang.String localePath)Do the action for the given locale.java.io.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(java.io.File targetDirectory)Methods inherited from class org.nuiton.jaxx.plugin.AbstractGenerateHelpMojo
cleanHelpIdsStore, doAction, getHelpIdsFilename, getHelpIdsStoreFile, getMergeHelpIdsFilename, getMergeHelpIdsStoreFile, getOutputHelpIds, loadHelpIds, removeQuote, setHelpIdsFilename, setMergeHelpIdsFilename, setOutputHelpIds, storeHelpIdsMethods inherited from class org.nuiton.jaxx.plugin.AbstractJaxxMojo
checkPackaging, getEncoding, getLastModified, getProject, isForce, isVerbose, setEncoding, setForce, setProject, setVerboseMethods 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, writeFileMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.plugin.Mojo
execute, getLog, setLog
-
Field Details
-
INPUT_FILENAME_FULL_FORMAT
public static final java.lang.String INPUT_FILENAME_FULL_FORMAT- See Also:
- Constant Field Values
-
INPUT_FILENAME_FORMAT
public static final java.lang.String INPUT_FILENAME_FORMAT- See Also:
- Constant Field Values
-
mergeIdsToInput
@Parameter(property="jaxx.mergeIdsToInput", defaultValue="false", required=true) protected boolean mergeIdsToInputFlag to merge ids into input directory.- Since:
- 2.5.12
-
strictMode
@Parameter(property="jaxx.strictMode", defaultValue="false", required=true) protected boolean strictModeFlag to remove obsolete ids into input files. Important Note: Be sure to use this after a clean, or using withjaxx.forceproperty to get all ids of any jaxx files detected, otherwise you could loose some data. USE WITH CAUTION. Note: Only used whenmergeIdsToInputparameter is on.- Since:
- 2.5.12
-
inputHelpDirectory
@Parameter(property="jaxx.inputHelpDirectory", defaultValue="src/main/help", required=true) protected java.io.File inputHelpDirectoryDirectory where to merge (create) input files. Note: Only used whenmergeIdsToInputparameter is on.- Since:
- 2.5.12
-
inputHelpFilenamePrefix
@Parameter(property="jaxx.inputHelpFilenamePrefix", defaultValue="helpMapping", required=true) protected java.lang.String inputHelpFilenamePrefixPrefix of input files. Note:-locale.propertieswill be added to each generated file (example:helpMapping-fr_FR.properties). Note: Only used whenmergeIdsToInputparameter is on.- Since:
- 2.5.12
-
helpIds
protected java.util.Set<java.lang.String> helpIdshelp ids to react.
-
-
Constructor Details
-
GenerateHelpIdsMojo
public GenerateHelpIdsMojo()
-
-
Method Details
-
init
public void init() throws java.lang.Exception- Overrides:
initin classAbstractGenerateHelpMojo- Throws:
java.lang.Exception
-
checkSkip
protected boolean checkSkip()- Overrides:
checkSkipin classAbstractGenerateHelpMojo
-
preDoAction
protected void preDoAction() throws java.io.IOExceptionDescription copied from class:AbstractGenerateHelpMojoCall back before doing all stuff for all locales declared- Specified by:
preDoActionin classAbstractGenerateHelpMojo- Throws:
java.io.IOException
-
doActionForLocale
protected void doActionForLocale(java.util.Locale locale, boolean isDefaultLocale, java.io.File source, java.lang.String localePath) throws java.lang.ExceptionDescription 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 localesource- where are stored help files for the given localelocalePath- the locale path to use (isdefaultif given locale is default).- Throws:
java.lang.Exception- if any pb
-
postDoAction
protected void postDoAction()Description copied from class:AbstractGenerateHelpMojoCall back after doing all stuff for all locales declared- Specified by:
postDoActionin classAbstractGenerateHelpMojo
-
getTargetDirectory
public java.io.File getTargetDirectory()- Specified by:
getTargetDirectoryin classAbstractJaxxMojo
-
setTargetDirectory
public void setTargetDirectory(java.io.File targetDirectory)- Specified by:
setTargetDirectoryin classAbstractJaxxMojo
-