|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.plugin.AbstractMojo org.codehaus.mojo.license.AbstractLicenseMojo org.codehaus.mojo.license.AbstractAddThirdPartyMojo org.codehaus.mojo.license.AddThirdPartyMojo
public class AddThirdPartyMojo
Goal to generate the third-party license file.
This file contains a list of the dependencies and their licenses. Each dependency and it's license is displayed on a single line in the format(<license-name>) <project-name> <groupId>:<artifactId>:<version> - <project-url>It will also copy it in the class-path (says add the generated directory as a resource of the build).
Field Summary | |
---|---|
protected boolean |
deployMissingFile
Deploy the third party missing file in maven repository. |
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepository
Local Repository. |
protected List |
remoteRepositories
Remote repositories used for the project. |
protected boolean |
useRepositoryMissingFiles
Load from repositories third party missing files. |
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 | |
---|---|
AddThirdPartyMojo()
|
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 boolean |
computeDoGenerateMissingFile(SortedProperties unsafeMappings,
SortedSet<org.apache.maven.project.MavenProject> unsafeDependencies)
|
protected SortedProperties |
createUnsafeMapping()
|
protected void |
doAction()
Do plugin action. |
org.apache.maven.artifact.repository.ArtifactRepository |
getLocalRepository()
|
List |
getRemoteRepositories()
|
boolean |
isDeployMissingFile()
|
boolean |
isDoGenerateMissing()
|
boolean |
isIncludeTransitiveDependencies()
|
boolean |
isUseRepositoryMissingFiles()
|
protected SortedMap<String,org.apache.maven.project.MavenProject> |
loadDependencies()
|
void |
setDoGenerateMissing(boolean doGenerateMissing)
|
protected void |
writeMissingFile()
|
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 |
Methods inherited from interface org.codehaus.mojo.license.MavenProjectDependenciesConfigurator |
---|
getExcludedArtifacts, getExcludedGroups, getExcludedScopes, getIncludedArtifacts, getIncludedGroups, getIncludedScopes, isVerbose |
Field Detail |
---|
protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
protected List remoteRepositories
protected boolean deployMissingFile
protected boolean useRepositoryMissingFiles
Constructor Detail |
---|
public AddThirdPartyMojo()
Method Detail |
---|
protected boolean checkPackaging()
AbstractLicenseMojo
AbstractLicenseMojo.execute()
.
Tip: There is two method to simplify the packaging check :
AbstractLicenseMojo.acceptPackaging(String...)
and
AbstractLicenseMojo.rejectPackaging(String...)
checkPackaging
in class AbstractLicenseMojo
true
if can execute the goal for the packaging of the project, false
otherwise.protected SortedMap<String,org.apache.maven.project.MavenProject> loadDependencies()
loadDependencies
in class AbstractAddThirdPartyMojo
protected SortedProperties createUnsafeMapping() throws org.apache.maven.project.ProjectBuildingException, IOException, ThirdPartyToolException
createUnsafeMapping
in class AbstractAddThirdPartyMojo
org.apache.maven.project.ProjectBuildingException
IOException
ThirdPartyToolException
protected boolean computeDoGenerateMissingFile(SortedProperties unsafeMappings, SortedSet<org.apache.maven.project.MavenProject> unsafeDependencies) throws IOException
unsafeMappings
- the unsafe mapping coming from the missing fileunsafeDependencies
- the unsafe dependencies from the project
true
if missing ifle should be (re-)generated, false
otherwise
IOException
- if any IO problemprotected boolean checkSkip()
AbstractLicenseMojo
checkSkip
in class AbstractLicenseMojo
false
if the mojo should not be executed.protected void doAction() throws Exception
AbstractLicenseMojo
AbstractLicenseMojo.execute()
invoke this method only and only if :
AbstractLicenseMojo.checkPackaging()
returns true
.AbstractLicenseMojo.init()
returns true
.
doAction
in class AbstractLicenseMojo
Exception
- if anyprotected void writeMissingFile() throws IOException
IOException
public boolean isDoGenerateMissing()
public void setDoGenerateMissing(boolean doGenerateMissing)
public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
public List getRemoteRepositories()
public boolean isIncludeTransitiveDependencies()
isIncludeTransitiveDependencies
in interface MavenProjectDependenciesConfigurator
true
if should include transitive dependencies, false
to include only direct
dependencies.public boolean isDeployMissingFile()
public boolean isUseRepositoryMissingFiles()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |