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.JaxxFileUpdater
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>
helpIds
help ids to react.static String
INPUT_FILENAME_FORMAT
static String
INPUT_FILENAME_FULL_FORMAT
protected File
inputHelpDirectory
Directory where to merge (create) input files.protected String
inputHelpFilenamePrefix
Prefix of input files.protected boolean
mergeIdsToInput
Flag to merge ids into input directory.protected boolean
strictMode
Flag to remove obsolete ids into input files.-
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 GenerateHelpIdsMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkSkip()
protected void
doActionForLocale(Locale locale, boolean isDefaultLocale, File source, String localePath)
Do the action for the given locale.File
getTargetDirectory()
void
init()
protected void
postDoAction()
Call back after doing all stuff for all locales declaredprotected void
preDoAction()
Call back before doing all stuff for all locales declaredvoid
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, 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
-
INPUT_FILENAME_FULL_FORMAT
public static final String INPUT_FILENAME_FULL_FORMAT
- See Also:
- Constant Field Values
-
INPUT_FILENAME_FORMAT
public static final String INPUT_FILENAME_FORMAT
- See Also:
- Constant Field Values
-
mergeIdsToInput
@Parameter(property="jaxx.mergeIdsToInput", defaultValue="false", required=true) protected boolean mergeIdsToInput
Flag to merge ids into input directory.- Since:
- 2.5.12
-
strictMode
@Parameter(property="jaxx.strictMode", defaultValue="false", required=true) protected boolean strictMode
Flag to remove obsolete ids into input files. Important Note: Be sure to use this after a clean, or using withjaxx.force
property to get all ids of any jaxx files detected, otherwise you could loose some data. USE WITH CAUTION. Note: Only used whenmergeIdsToInput
parameter is on.- Since:
- 2.5.12
-
inputHelpDirectory
@Parameter(property="jaxx.inputHelpDirectory", defaultValue="src/main/help", required=true) protected File inputHelpDirectory
Directory where to merge (create) input files. Note: Only used whenmergeIdsToInput
parameter is on.- Since:
- 2.5.12
-
inputHelpFilenamePrefix
@Parameter(property="jaxx.inputHelpFilenamePrefix", defaultValue="helpMapping", required=true) protected String inputHelpFilenamePrefix
Prefix of input files. Note:-locale.properties
will be added to each generated file (example:helpMapping-fr_FR.properties
). Note: Only used whenmergeIdsToInput
parameter is on.- Since:
- 2.5.12
-
-
Method Detail
-
init
public void init() throws Exception
- Overrides:
init
in classAbstractGenerateHelpMojo
- Throws:
Exception
-
checkSkip
protected boolean checkSkip()
- Overrides:
checkSkip
in classAbstractGenerateHelpMojo
-
preDoAction
protected void preDoAction() throws IOException
Description copied from class:AbstractGenerateHelpMojo
Call back before doing all stuff for all locales declared- Specified by:
preDoAction
in classAbstractGenerateHelpMojo
- Throws:
IOException
-
doActionForLocale
protected void doActionForLocale(Locale locale, boolean isDefaultLocale, File source, String localePath) throws Exception
Description copied from class:AbstractGenerateHelpMojo
Do the action for the given locale.- Specified by:
doActionForLocale
in classAbstractGenerateHelpMojo
- Parameters:
locale
- the locale to treateisDefaultLocale
-true
if given locale is de the default localesource
- where are stored help files for the given localelocalePath
- the locale path to use (isdefault
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 classAbstractGenerateHelpMojo
-
getTargetDirectory
public File getTargetDirectory()
- Specified by:
getTargetDirectory
in classAbstractJaxxMojo
-
setTargetDirectory
public void setTargetDirectory(File targetDirectory)
- Specified by:
setTargetDirectory
in classAbstractJaxxMojo
-
-