|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.license.AbstractLicenseMojo
org.codehaus.mojo.license.AbstractLicenseNameMojo
org.codehaus.mojo.license.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.
| Field Summary | |
|---|---|
protected String |
bundleLicensePath
The path of the bundled license file to produce when generateBundle is on. |
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()
Do plugin action. |
String |
getBundleLicensePath()
|
File |
getLicenseFile()
|
File |
getOutputDirectory()
|
protected void |
init()
Method to initialize the mojo before doing any concrete actions. |
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.codehaus.mojo.license.AbstractLicenseNameMojo |
|---|
checkSkip, getLicense, getLicense, getLicenseName, getLicenseResolver, getLicenseStore, isKeepBackup, setKeepBackup, setLicenseName, setLicenseResolver, setLicenseStore |
| Methods inherited from class org.codehaus.mojo.license.AbstractLicenseMojo |
|---|
acceptPackaging, addResourceDir, afterExecute, checkEncoding, checkPackaging, 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 |
| 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
| Constructor Detail |
|---|
public UpdateProjectLicenseMojo()
| Method Detail |
|---|
protected void init()
throws Exception
AbstractLicenseMojoAbstractLicenseMojo.doAction() method.
init in class AbstractLicenseNameMojoException - if any
protected void doAction()
throws Exception
AbstractLicenseMojoAbstractLicenseMojo.execute() invoke this method only and only if :
AbstractLicenseMojo.checkPackaging() returns true.AbstractLicenseMojo.init() returns true.
doAction in class AbstractLicenseMojoException - if anypublic 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 AbstractLicenseMojo.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 | |||||||||