|
||||||||||
| 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.AbstractLicenseNameMojo
org.nuiton.license.plugin.UpdateProjectLicenseMojo
public class UpdateProjectLicenseMojo
Updates (or creates) the main project license file according to the given
license defines as AbstractLicenseNameMojo.licenseName.
META-INF class-path directory.
Note: this goal replace add-license one (which does not
use license project descriptor).
| 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 | |
|---|---|
protected String |
bundleLicensePath
The path of the bundled license file to produce when generateBundle is on. |
protected boolean |
doGenerate
flag to known if |
protected boolean |
force
A flag to force to generate project license file even if it is up-to-date. |
protected boolean |
generateBundle
A flag to copy the main license file in a bundled place. |
protected File |
licenseFile
Project license file to synchronize with main license defined in descriptor file. |
protected File |
outputDirectory
The directory where to generate license resources. |
protected boolean |
skipUpdateProjectLicense
A flag to skip the goal. |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
UpdateProjectLicenseMojo()
|
|
| Method Summary | |
|---|---|
protected void |
doAction()
|
String |
getBundleLicensePath()
|
File |
getLicenseFile()
|
File |
getOutputDirectory()
|
protected void |
init()
|
boolean |
isDoGenerate()
|
boolean |
isForce()
|
boolean |
isGenerateBundle()
|
boolean |
isSkip()
When is sets to true, will skip execution. |
void |
setBundleLicensePath(String bundleLicensePath)
|
void |
setDoGenerate(boolean doGenerate)
|
void |
setForce(boolean force)
|
void |
setGenerateBundle(boolean generateBundle)
|
void |
setLicenseFile(File licenseFile)
|
void |
setOutputDirectory(File outputDirectory)
|
void |
setSkip(boolean skipUpdateProjectLicense)
Changes internal state skip to execute (or not) goal. |
| Methods inherited from class org.nuiton.license.plugin.AbstractLicenseNameMojo |
|---|
checkLicense, checkSkip, getEncoding, getLicense, getLicenseName, getLicenseResolver, getLicenseStore, getMainLicense, isKeepBackup, setEncoding, setKeepBackup, setLicenseName, setLicenseResolver, setLicenseStore |
| 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, 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 |
| Field Detail |
|---|
protected File licenseFile
protected File outputDirectory
pom module types.
protected boolean generateBundle
true, will copy the license file to the
bundleLicensePath to outputDirectory.
Note: This option is not available for pom module types.
protected String bundleLicensePath
generateBundle is on.
Note: This option is not available for pom module types.
protected boolean force
protected boolean skipUpdateProjectLicense
protected boolean doGenerate
| Constructor Detail |
|---|
public UpdateProjectLicenseMojo()
| Method Detail |
|---|
protected void init()
throws Exception
init in class AbstractLicenseNameMojoException
protected void doAction()
throws Exception
doAction in class org.nuiton.plugin.AbstractPluginExceptionpublic File getLicenseFile()
public boolean isGenerateBundle()
public File getOutputDirectory()
public String getBundleLicensePath()
public boolean isDoGenerate()
public boolean isForce()
public boolean isSkip()
AbstractLicenseNameMojotrue, will skip execution.
This will take effects in method AbstractLicenseNameMojo.checkSkip().
So the method AbstractPlugin.doAction() will never be invoked.
isSkip in class AbstractLicenseNameMojotrue if goal will not be executedpublic void setLicenseFile(File licenseFile)
public void setGenerateBundle(boolean generateBundle)
public void setOutputDirectory(File outputDirectory)
public void setBundleLicensePath(String bundleLicensePath)
public void setDoGenerate(boolean doGenerate)
public void setSkip(boolean skipUpdateProjectLicense)
AbstractLicenseNameMojoskip to execute (or not) goal.
setSkip in class AbstractLicenseNameMojoskipUpdateProjectLicense - new state valuepublic void setForce(boolean force)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||