Package org.codehaus.mojo.license
Class UpdateFileHeaderMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.license.AbstractLicenseMojo
org.codehaus.mojo.license.AbstractLicenseNameMojo
org.codehaus.mojo.license.AbstractFileHeaderMojo
org.codehaus.mojo.license.UpdateFileHeaderMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="update-file-header",
threadSafe=true)
public class UpdateFileHeaderMojo
extends AbstractFileHeaderMojo
The goal to update (or add) the header on project source files.
This goal replace the update-header goal which can not deal with
Copyright.
This goal use a specific project file descriptor project.xml to
describe all files to update for a whole project.
- Since:
- 1.0
- 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
ConstructorsConstructorDescriptionUpdateFileHeaderMojo(Map<String, FileHeaderTransformer> transformers, org.apache.maven.project.MavenProjectHelper projectHelper) -
Method Summary
Methods inherited from class org.codehaus.mojo.license.AbstractFileHeaderMojo
doAction, initMethods 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, isVerbose, rejectPackaging, setEncoding, setVerbose, shouldSkipMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
UpdateFileHeaderMojo
@Inject public UpdateFileHeaderMojo(Map<String, FileHeaderTransformer> transformers, org.apache.maven.project.MavenProjectHelper projectHelper)
-
-
Method Details
-
isSkip
public boolean isSkip()Description copied from class:AbstractLicenseMojoWhen is sets totrue, will skip execution. This will take effect in at the very begin of theAbstractLicenseMojo.execute()before any initialisation of goal.- Specified by:
isSkipin classAbstractLicenseMojo- Returns:
trueif goal will not be executed
-
isDryRun
protected boolean isDryRun()- Specified by:
isDryRunin classAbstractFileHeaderMojo- Returns:
trueif mojo must be a simple dry run (says do not modifiy any scanned files),falseotherise.
-
isFailOnMissingHeader
protected boolean isFailOnMissingHeader()- Specified by:
isFailOnMissingHeaderin classAbstractFileHeaderMojo- Returns:
trueif mojo should fails if dryRun and there is some missing license header,falseotherwise.
-
isFailOnNotUptodateHeader
protected boolean isFailOnNotUptodateHeader()- Specified by:
isFailOnNotUptodateHeaderin classAbstractFileHeaderMojo- Returns:
trueif mojo should fails if dryRun and there is some obsolete license header,falseotherwise.
-