@Mojo(name="update-project-license",
requiresProject=true,
defaultPhase=GENERATE_RESOURCES)
public class UpdateProjectLicenseMojo
extends AbstractLicenseNameMojo
META-INF class-path directory.| Modifier and Type | Field and Description |
|---|---|
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.
|
copyrightOwners, DEFAULT_EXCLUDES, DEFAULT_INCLUDES, DEFAULT_ROOTS, extraTemplateParameters, inceptionYear, organizationName, projectName| Constructor and Description |
|---|
UpdateProjectLicenseMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doAction()
Do plugin action.
|
protected void |
init()
Method to initialize the mojo before doing any concrete actions.
|
boolean |
isSkip()
When is sets to
true, will skip execution. |
getCopyrightOwners, getLicense, getLicense, getLicenseName, isKeepBackup, processLicenseContextacceptPackaging, addResourceDir, afterExecute, checkEncoding, checkPackaging, checkSkip, execute, getBuildTimestamp, getEncoding, getProject, getSession, hasClassPath, isSkipAll, isVerbose, rejectPackaging, setEncoding, setVerbose@Parameter(property="license.licenceFile",
defaultValue="${basedir}/LICENSE.txt")
protected File licenseFile
@Parameter(property="license.outputDirectory",
defaultValue="target/generated-sources/license")
protected File outputDirectory
pom module types.@Parameter(property="license.generateBundle",
defaultValue="false")
protected boolean generateBundle
true, will copy the license file to the
bundleLicensePath to outputDirectory.
Note: This option is not available for pom module types.@Parameter(property="license.bundleLicensePath",
defaultValue="META-INF/${project.artifactId}-LICENSE.txt")
protected String bundleLicensePath
generateBundle is on.
Note: This option is not available for pom module types.@Parameter(property="license.force",
defaultValue="false")
protected boolean force
@Parameter(property="license.skipUpdateProjectLicense",
defaultValue="false")
protected boolean skipUpdateProjectLicense
public boolean isSkip()
true, will skip execution.
This will take effect in at the very begin of the AbstractLicenseMojo.execute()
before any initialisation of goal.isSkip in class AbstractLicenseMojotrue if goal will not be executedprotected void init()
throws Exception
AbstractLicenseMojo.doAction() method.init in class AbstractLicenseNameMojoException - if anyprotected void doAction()
throws Exception
AbstractLicenseMojo.execute() invoke this method only and only if :
AbstractLicenseMojo.checkPackaging() returns true.AbstractLicenseMojo.init() returns true.doAction in class AbstractLicenseMojoException - if anyCopyright © 2010–2023. All rights reserved.