org.codehaus.mojo.license
Class AbstractLicenseNameMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.license.AbstractLicenseMojo
org.codehaus.mojo.license.AbstractLicenseNameMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
- UpdateFileHeaderMojo, UpdateProjectLicenseMojo
public abstract class AbstractLicenseNameMojo
- extends AbstractLicenseMojo
Abstract mojo which using a licenseName
and owns a
licenseStore
.
- Since:
- 1.0
- Author:
- tchemit
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
Methods inherited from class org.codehaus.mojo.license.AbstractLicenseMojo |
acceptPackaging, addResourceDir, afterExecute, checkEncoding, checkPackaging, doAction, execute, getBuildTimestamp, getEncoding, getProject, getSession, hasClassPath, isVerbose, rejectPackaging, setEncoding, setProject, setSession, setVerbose |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractLicenseNameMojo
public AbstractLicenseNameMojo()
isSkip
public abstract boolean isSkip()
- When is sets to
true
, will skip execution.
This will take effects in method checkSkip()
.
So the method AbstractLicenseMojo.doAction()
will never be invoked.
- Returns:
true
if goal will not be executed
setSkip
public abstract void setSkip(boolean skip)
- Changes internal state
skip
to execute (or not) goal.
- Parameters:
skip
- new state value
checkSkip
protected boolean checkSkip()
- Description copied from class:
AbstractLicenseMojo
- Checks if the mojo execution should be skipped.
- Overrides:
checkSkip
in class AbstractLicenseMojo
- Returns:
false
if the mojo should not be executed.
init
protected void init()
throws Exception
- Description copied from class:
AbstractLicenseMojo
- Method to initialize the mojo before doing any concrete actions.
Note: The method is invoked before the
AbstractLicenseMojo.doAction()
method.
- Specified by:
init
in class AbstractLicenseMojo
- Throws:
Exception
- if any
getLicense
public License getLicense(String licenseName,
boolean checkIfExists)
throws IllegalArgumentException,
IllegalStateException
- Throws:
IllegalArgumentException
IllegalStateException
isKeepBackup
public boolean isKeepBackup()
getLicenseName
public String getLicenseName()
getLicenseResolver
public String getLicenseResolver()
getLicenseStore
public LicenseStore getLicenseStore()
getLicense
public License getLicense()
setKeepBackup
public void setKeepBackup(boolean keepBackup)
setLicenseResolver
public void setLicenseResolver(String licenseResolver)
setLicenseName
public void setLicenseName(String licenseName)
setLicenseStore
public void setLicenseStore(LicenseStore licenseStore)
Copyright © 2010-2012 The Kuali Foundation. All Rights Reserved.