org.codehaus.mojo.license
Class AggregatorAddThirdPartyMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.license.AbstractLicenseMojo
          extended by org.codehaus.mojo.license.AbstractAddThirdPartyMojo
              extended by org.codehaus.mojo.license.AggregatorAddThirdPartyMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class AggregatorAddThirdPartyMojo
extends AbstractAddThirdPartyMojo

This aggregator goal (will be executed only once and only on pom projects) executed the add-third-party on all his modules (in a parellel build cycle) then aggreates all the third-party files in final one in the pom project.

Since:
1.0
Author:
tchemit

Field Summary
protected  List<?> reactorProjects
          The projects in the reactor.
 
Fields inherited from class org.codehaus.mojo.license.AbstractAddThirdPartyMojo
artifactLicenseMapping, bundleThirdPartyPath, excludedArtifacts, excludedGroups, excludedScopes, failIfWarning, force, generateBundle, groupByLicense, includedArtifacts, includedGroups, includedScopes, includeTransitiveDependencies, licenseMerges, missingFile, NO_DEPENDENCIES_MESSAGE, outputDirectory, thirdPartyFilename, useMissingFile
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AggregatorAddThirdPartyMojo()
           
 
Method Summary
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()
           
protected  void doAction()
          Do plugin action.
protected  SortedMap<String,org.apache.maven.project.MavenProject> loadDependencies()
           
 
Methods inherited from class org.codehaus.mojo.license.AbstractAddThirdPartyMojo
checkUnsafeDependencies, copyToFileSystem, createLicenseMap, exists, getArtifactCache, getArtifactLicenseMapping, getBundleThirdPartyPath, getExcludedArtifacts, getExcludedGroups, getExcludedScopes, getIncludedArtifacts, getIncludedGroups, getIncludedScopes, getLicenseMap, getMissingFile, getOutputDirectory, getProjectDependencies, getThirdPartyFile, getThirdPartyFilename, getThridPartyTool, getUnsafeDependencies, getUnsafeMappings, init, isDoGenerate, isDoGenerateBundle, isFailIfWarning, isForce, isGenerateBundle, isGroupByLicense, isUseMissingFile, setArtifactLicenseMapping, setBundleThirdPartyPath, setDoGenerate, setDoGenerateBundle, setExcludedArtifacts, setExcludedGroups, setExcludedScopes, setFailIfWarning, setForce, setGenerateBundle, setGroupByLicense, setIncludedArtifacts, setIncludedGroups, setIncludedScopes, setMissingFile, setOutputDirectory, setThirdPartyFile, setThirdPartyFilename, setThridPartyTool, setUnsafeDependencies, setUseMissingFile, writeThirdPartyFile
 
Methods inherited from class org.codehaus.mojo.license.AbstractLicenseMojo
acceptPackaging, addResourceDir, afterExecute, checkEncoding, 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

reactorProjects

protected List<?> reactorProjects
The projects in the reactor.

Since:
1.0
Constructor Detail

AggregatorAddThirdPartyMojo

public AggregatorAddThirdPartyMojo()
Method Detail

checkPackaging

protected boolean checkPackaging()
Description copied from class: AbstractLicenseMojo
Check if the project packaging is acceptable for the mojo.

By default, accept all packaging types.

Note: This method is the first instruction to be executed in the AbstractLicenseMojo.execute().

Tip: There is two method to simplify the packaging check :

AbstractLicenseMojo.acceptPackaging(String...)

and

AbstractLicenseMojo.rejectPackaging(String...)

Overrides:
checkPackaging in class AbstractLicenseMojo
Returns:
true if can execute the goal for the packaging of the project, false otherwise.

checkSkip

protected boolean checkSkip()
Description copied from class: AbstractLicenseMojo
Checks if the mojo execution should be skipped.

Overrides:
checkSkip in class AbstractLicenseMojo
Returns:
false if the mojo should not be executed.

loadDependencies

protected SortedMap<String,org.apache.maven.project.MavenProject> loadDependencies()
Specified by:
loadDependencies in class AbstractAddThirdPartyMojo

createUnsafeMapping

protected SortedProperties createUnsafeMapping()
                                        throws org.apache.maven.project.ProjectBuildingException,
                                               IOException
Specified by:
createUnsafeMapping in class AbstractAddThirdPartyMojo
Throws:
org.apache.maven.project.ProjectBuildingException
IOException

doAction

protected void doAction()
                 throws Exception
Description copied from class: AbstractLicenseMojo
Do plugin action.

The method AbstractLicenseMojo.execute() invoke this method only and only if :

Specified by:
doAction in class AbstractLicenseMojo
Throws:
Exception - if any


Copyright © 2010-2012 The Kuali Foundation. All Rights Reserved.