|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.nuiton.plugin.AbstractPlugin
org.nuiton.license.plugin.AbstractLicenseMojo
org.nuiton.license.plugin.AbstractLicenseWithDescriptorMojo
public abstract class AbstractLicenseWithDescriptorMojo
Abstract mojo which using descriptor file and owns a
licenseStore.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin |
|---|
org.nuiton.plugin.Plugin.InitState, org.nuiton.plugin.Plugin.Packaging |
| Field Summary |
|---|
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
AbstractLicenseWithDescriptorMojo()
|
|
| Method Summary | |
|---|---|
protected void |
checkLicense(String licenseName)
Check if the given license name is valid (not null, nor empty) and exists in the license store. |
protected boolean |
checkSkip()
|
File |
getDescriptor()
Deprecated. |
String |
getEncoding()
|
License |
getLicense(String licenseName)
|
String |
getLicenseName()
|
LicenseProjectDescriptor |
getLicenseProjectDescriptor()
Deprecated. |
String |
getLicenseResolver()
|
LicenseStore |
getLicenseStore()
|
License |
getMainLicense()
|
protected void |
init()
|
boolean |
isKeepBackup()
|
abstract boolean |
isSkip()
When is sets to true, will skip execution. |
void |
setDescriptor(File descriptor)
Deprecated. |
void |
setEncoding(String encoding)
|
void |
setKeepBackup(boolean keepBackup)
|
void |
setLicenseName(String licenseName)
|
void |
setLicenseProjectDescriptor(LicenseProjectDescriptor licenseProjectDescriptor)
Deprecated. |
void |
setLicenseResolver(String licenseResolver)
|
void |
setLicenseStore(LicenseStore licenseStore)
|
abstract void |
setSkip(boolean skip)
Changes internal state skip to execute (or not) goal. |
protected void |
validateLicenseProjectDescriptor(LicenseProjectDescriptor licenseProjectDescriptor)
Deprecated. |
| Methods inherited from class org.nuiton.license.plugin.AbstractLicenseMojo |
|---|
createLicenseStore, getBuildTimestamp, getProject, getSession, isVerbose, setProject, setSession, setVerbose |
| Methods inherited from class org.nuiton.plugin.AbstractPlugin |
|---|
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkEncoding, checkPackaging, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, doAction, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFile |
| 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 |
| Methods inherited from interface org.nuiton.plugin.Plugin |
|---|
getProject, isVerbose, setProject, setVerbose |
| Methods inherited from interface org.apache.maven.plugin.Mojo |
|---|
execute, getLog, setLog |
| Constructor Detail |
|---|
public AbstractLicenseWithDescriptorMojo()
| Method Detail |
|---|
public abstract boolean isSkip()
true, will skip execution.
This will take effects in method checkSkip().
So the method AbstractPlugin.doAction() will never be invoked.
true if goal will not be executedpublic abstract void setSkip(boolean skip)
skip to execute (or not) goal.
skip - new state valueprotected boolean checkSkip()
checkSkip in class org.nuiton.plugin.AbstractPlugin
protected void init()
throws Exception
init in class org.nuiton.plugin.AbstractPluginException
@Deprecated
protected void validateLicenseProjectDescriptor(LicenseProjectDescriptor licenseProjectDescriptor)
throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
public License getMainLicense()
throws IllegalArgumentException,
IllegalStateException,
org.apache.maven.plugin.MojoFailureException
IllegalArgumentException
IllegalStateException
org.apache.maven.plugin.MojoFailureException
public License getLicense(String licenseName)
throws IllegalArgumentException,
IllegalStateException
IllegalArgumentException
IllegalStateException
protected void checkLicense(String licenseName)
throws IllegalArgumentException,
IllegalStateException,
org.apache.maven.plugin.MojoFailureException
licenseName - the name of the license to check
IllegalArgumentException - if license is not valid
IllegalStateException - if license store is not initialized
org.apache.maven.plugin.MojoFailureException - if license does not existpublic final String getEncoding()
getEncoding in interface org.nuiton.plugin.PluginWithEncodingpublic final void setEncoding(String encoding)
setEncoding in interface org.nuiton.plugin.PluginWithEncoding@Deprecated public File getDescriptor()
public boolean isKeepBackup()
public String getLicenseName()
public String getLicenseResolver()
public LicenseStore getLicenseStore()
@Deprecated public LicenseProjectDescriptor getLicenseProjectDescriptor()
public void setKeepBackup(boolean keepBackup)
@Deprecated public void setDescriptor(File descriptor)
public void setLicenseResolver(String licenseResolver)
public void setLicenseName(String licenseName)
public void setLicenseStore(LicenseStore licenseStore)
@Deprecated public void setLicenseProjectDescriptor(LicenseProjectDescriptor licenseProjectDescriptor)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||