Package org.codehaus.mojo.license
Class AbstractFileHeaderMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.license.AbstractLicenseMojo
org.codehaus.mojo.license.AbstractLicenseNameMojo
org.codehaus.mojo.license.AbstractFileHeaderMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
CheckFileHeaderMojo,UpdateFileHeaderMojo
Abstract mojo for file-header operations (check, update, report,...).
- Since:
- 1.2
- Author:
- tchemit dev@tchemit.fr
-
Field Summary
Fields inherited from class org.codehaus.mojo.license.AbstractLicenseNameMojo
copyrightOwners, copyrightStringFormat, DEFAULT_EXCLUDES, DEFAULT_INCLUDES, DEFAULT_ROOTS, extraTemplateParameters, ignoreLastDate, inceptionYear, organizationName, projectNameFields inherited from class org.codehaus.mojo.license.AbstractLicenseMojo
projectHelperFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractFileHeaderMojo(Map<String, FileHeaderTransformer> transformers, org.apache.maven.project.MavenProjectHelper projectHelper) -
Method Summary
Methods inherited from class org.codehaus.mojo.license.AbstractLicenseNameMojo
getCopyrightOwners, getLicense, getLicense, getLicenseName, isKeepBackup, processLicenseContextMethods inherited from class org.codehaus.mojo.license.AbstractLicenseMojo
acceptPackaging, addResourceDir, afterExecute, checkEncoding, checkPackaging, execute, getEncoding, getProject, hasClassPath, isSkip, isVerbose, rejectPackaging, setEncoding, setVerbose, shouldSkipMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
AbstractFileHeaderMojo
protected AbstractFileHeaderMojo(Map<String, FileHeaderTransformer> transformers, org.apache.maven.project.MavenProjectHelper projectHelper)
-
-
Method Details
-
isDryRun
protected abstract boolean isDryRun()- Returns:
trueif mojo must be a simple dry run (says do not modifiy any scanned files),falseotherise.
-
isFailOnMissingHeader
protected abstract boolean isFailOnMissingHeader()- Returns:
trueif mojo should fails if dryRun and there is some missing license header,falseotherwise.
-
isFailOnNotUptodateHeader
protected abstract boolean isFailOnNotUptodateHeader()- Returns:
trueif mojo should fails if dryRun and there is some obsolete license header,falseotherwise.
-
init
Description copied from class:AbstractLicenseNameMojoMethod to initialize the mojo before doing any concrete actions. Note: The method is invoked before theAbstractLicenseMojo.doAction()method.- Overrides:
initin classAbstractLicenseNameMojo- Throws:
Exception- if any
-
doAction
Description copied from class:AbstractLicenseMojoDo plugin action. The methodAbstractLicenseMojo.execute()invoke this method only and only if :AbstractLicenseMojo.checkPackaging()returnstrue.- method
AbstractLicenseMojo.init()returnstrue.
- Specified by:
doActionin classAbstractLicenseMojo- Throws:
Exception- if any
-