Package org.codehaus.mojo.license
Class CheckProjectLicenseMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.license.AbstractLicenseMojo
org.codehaus.mojo.license.CheckProjectLicenseMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="check-project-license",
threadSafe=true)
public class CheckProjectLicenseMojo
extends AbstractLicenseMojo
The goal to check if there are license files in project.
- Since:
- 2.7.0
- Author:
- swalendzik
-
Field Summary
Fields inherited from class org.codehaus.mojo.license.AbstractLicenseMojo
projectHelper
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
ConstructorsConstructorDescriptionCheckProjectLicenseMojo
(org.apache.maven.project.MavenProjectHelper projectHelper) -
Method Summary
Methods inherited from class org.codehaus.mojo.license.AbstractLicenseMojo
acceptPackaging, addResourceDir, afterExecute, checkEncoding, checkPackaging, execute, getEncoding, getProject, hasClassPath, isVerbose, rejectPackaging, setEncoding, setVerbose, shouldSkip
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
CheckProjectLicenseMojo
@Inject public CheckProjectLicenseMojo(org.apache.maven.project.MavenProjectHelper projectHelper)
-
-
Method Details
-
isSkip
public boolean isSkip()Description copied from class:AbstractLicenseMojo
When 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:
isSkip
in classAbstractLicenseMojo
- Returns:
true
if goal will not be executed
-
init
Description copied from class:AbstractLicenseMojo
Method to initialize the mojo before doing any concrete actions. Note: The method is invoked before theAbstractLicenseMojo.doAction()
method.- Specified by:
init
in classAbstractLicenseMojo
- Throws:
Exception
- if any
-
doAction
Description copied from class:AbstractLicenseMojo
Do plugin action. The methodAbstractLicenseMojo.execute()
invoke this method only and only if :AbstractLicenseMojo.checkPackaging()
returnstrue
.- method
AbstractLicenseMojo.init()
returnstrue
.
- Specified by:
doAction
in classAbstractLicenseMojo
- Throws:
Exception
- if any
-