Package org.nuiton.jaxx.plugin
Class GenerateHelpFilesMojo
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.GenerateHelpFilesMojo
- 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-files",
defaultPhase=PROCESS_SOURCES,
requiresProject=true,
requiresDependencyResolution=COMPILE)
@Execute(goal="generate-help-ids")
public class GenerateHelpFilesMojo
extends AbstractGenerateHelpMojo
Mojo to generate javax help files for your project.
- 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 static java.lang.StringAUTOREMOVE_LINEprotected java.io.FilecontentTemplateThe template used to generate helpset content file.protected java.util.PropertieshelpIdsThe help ids discovered.protected java.lang.StringhelpsetNameThe name of the helpset to generate.protected java.io.FilehelpsetTemplateThe template used to generate helpset file.protected java.io.FileidsFileprotected java.lang.StringindexFileNameprotected java.io.FileindexTemplateThe template used to generate helpset index file.protected java.lang.StringmapFileNameprotected java.io.FilemapTemplateThe template used to generate helpset map file.protected java.io.FileoutputHelpThe directory where to create or update help files.protected java.lang.StringtocFileNameprotected java.io.FiletocTemplateThe template used to generate helpset toc file.protected inttouchedFilesFields 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 GenerateHelpFilesMojo() -
Method Summary
Modifier and Type Method Description protected booleancheckSkip()protected voiddoActionForLocale(java.util.Locale locale, boolean isDefaultLocale, java.io.File localizedTarget, java.lang.String localePath)Do the action for the given locale.protected voiddoGen(java.io.File template, java.io.File f, java.util.Properties env)protected intgenerateContentFiles(java.io.File localizedTarget, java.util.Properties env, java.lang.String localePath)protected booleangenerateHelpsetFile(java.io.File file, java.util.Properties env)protected NodeItemgenerateIndexFile(java.io.File file, java.util.Properties env)protected java.util.PropertiesgenerateMapFile(java.io.File file, java.util.Properties env)protected NodeItemgenerateTocFile(java.io.File file, java.util.Properties env)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 declaredprotected org.nuiton.plugin.VelocityTemplateGeneratorprepareGenerator(java.io.File template)voidsetTargetDirectory(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
-
AUTOREMOVE_LINE
protected static final java.lang.String AUTOREMOVE_LINE- See Also:
- Constant Field Values
-
outputHelp
@Parameter(property="jaxx.outputHelp", defaultValue="${project.basedir}/src/main/help", required=true) protected java.io.File outputHelpThe directory where to create or update help files.- Since:
- 2.0.0
-
helpsetName
@Parameter(property="jaxx.helpsetName", defaultValue="${project.artifactId}", required=true) protected java.lang.String helpsetNameThe name of the helpset to generate.- Since:
- 1.3
-
helpsetTemplate
@Parameter(property="jaxx.helpsetTemplate", defaultValue="/defaultHelpSet.hs.vm", required=true) protected java.io.File helpsetTemplateThe template used to generate helpset file. Must be an existing file or a ressource in class-path- Since:
- 1.3
-
mapTemplate
@Parameter(property="jaxx.mapTemplate", defaultValue="/defaultMap.jhm.vm", required=true) protected java.io.File mapTemplateThe template used to generate helpset map file. Must be an existing file or a ressource in class-path- Since:
- 1.3
-
indexTemplate
@Parameter(property="jaxx.indexTemplate", defaultValue="/defaultIndex.xml.vm", required=true) protected java.io.File indexTemplateThe template used to generate helpset index file. Must be an existing file or a ressource in class-path- Since:
- 1.3
-
tocTemplate
@Parameter(property="jaxx.tocTemplate", defaultValue="/defaultToc.xml.vm", required=true) protected java.io.File tocTemplateThe template used to generate helpset toc file. Must be an existing file or a ressource in class-path- Since:
- 1.3
-
contentTemplate
@Parameter(property="jaxx.contentTemplate", defaultValue="/defaultContent.html.vm", required=true) protected java.io.File contentTemplateThe template used to generate helpset content file. Must be an existing file or a ressource in class-path- Since:
- 1.3
-
mapFileName
protected java.lang.String mapFileName -
indexFileName
protected java.lang.String indexFileName -
tocFileName
protected java.lang.String tocFileName -
touchedFiles
protected int touchedFiles -
idsFile
protected java.io.File idsFile -
helpIds
protected java.util.Properties helpIdsThe help ids discovered.
-
-
Constructor Details
-
GenerateHelpFilesMojo
public GenerateHelpFilesMojo()
-
-
Method Details
-
getTargetDirectory
public java.io.File getTargetDirectory()- Specified by:
getTargetDirectoryin classAbstractJaxxMojo
-
setTargetDirectory
public void setTargetDirectory(java.io.File targetDirectory)- Specified by:
setTargetDirectoryin classAbstractJaxxMojo
-
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
-
postDoAction
protected void postDoAction()Description copied from class:AbstractGenerateHelpMojoCall back after doing all stuff for all locales declared- Specified by:
postDoActionin classAbstractGenerateHelpMojo
-
doActionForLocale
protected void doActionForLocale(java.util.Locale locale, boolean isDefaultLocale, java.io.File localizedTarget, 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 localelocalizedTarget- 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
-
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
-
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
-