@Mojo(name="aggregate-add-third-party",
aggregator=true,
defaultPhase=GENERATE_RESOURCES,
threadSafe=true)
public class AggregatorAddThirdPartyMojo
extends AbstractAddThirdPartyMojo
pluginManagement element of
the POM to set options, you have to name the execution 'add-third-party',
not 'default-cli'.AbstractAddThirdPartyMojo.ExcludedLicenses, AbstractAddThirdPartyMojo.HiddenLicenses, AbstractAddThirdPartyMojo.IncludedDependencies, AbstractAddThirdPartyMojo.IncludedLicensesDEP_SEPARATOR| Constructor and Description |
|---|
AggregatorAddThirdPartyMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkPackaging()
Check if the project packaging is acceptable for the mojo.
|
protected boolean |
checkSkip()
Checks if the mojo execution should be skipped.
|
protected SortedProperties |
createUnsafeMapping()
Creates the unsafe mapping (says dependencies with no license given by their pom).
|
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. |
protected SortedMap<String,org.apache.maven.project.MavenProject> |
loadDependencies()
Loads the dependencies of the project (as
MavenProject, indexed by their gav. |
getHelper, getLicenseMap, isFailIfWarning, isUseMissingFile, setExcludedLicenses, setIncludedLicensesacceptPackaging, addResourceDir, afterExecute, checkEncoding, execute, getBuildTimestamp, getEncoding, getProject, getSession, hasClassPath, isSkipAll, isVerbose, rejectPackaging, setEncoding, setVerbosepublic 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 boolean checkPackaging()
AbstractLicenseMojo.execute().
Tip: There is two method to simplify the packaging check :
AbstractLicenseMojo.acceptPackaging(String...)
and
AbstractLicenseMojo.rejectPackaging(String...)checkPackaging in class AbstractLicenseMojotrue if can execute the goal for the packaging of the
project, false otherwise.protected boolean checkSkip()
checkSkip in class AbstractLicenseMojofalse if the mojo should not be executed.protected void init()
throws Exception
AbstractAddThirdPartyMojoAbstractLicenseMojo.doAction() method.init in class AbstractAddThirdPartyMojoException - 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 anyprotected SortedMap<String,org.apache.maven.project.MavenProject> loadDependencies()
MavenProject, indexed by their gav.loadDependencies in class AbstractAddThirdPartyMojoprotected SortedProperties createUnsafeMapping() throws org.apache.maven.project.ProjectBuildingException, IOException
Can come from loaded missing file or from dependencies with no license at all.
createUnsafeMapping in class AbstractAddThirdPartyMojoorg.apache.maven.project.ProjectBuildingException - if could not create maven porject for some dependenciesIOException - if could not load missing fileCopyright © 2010–2023. All rights reserved.