|
||||||||||
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
public abstract class AbstractAddThirdPartyMojo
Abstract mojo for all third-party mojos.
Field Summary | |
---|---|
protected String |
artifactLicenseMapping
Location of a properties file mapping artifacts without a license to the license that should be used for them. |
protected String |
bundleThirdPartyPath
The path of the bundled third party file to produce when generateBundle is on. |
protected String |
excludedArtifacts
A filter to exclude some ArtifactsIds |
protected String |
excludedGroups
A filter to exclude some GroupIds |
protected String |
excludedScopes
A filter to exclude some scopes. |
protected boolean |
failIfWarning
A flag to fail the build if at least one dependency was detected without a license. |
protected boolean |
force
To force generation of the third-party file even if every thing is up to date. |
protected boolean |
generateBundle
A flag to copy a bundled version of the third-party file. |
protected boolean |
groupByLicense
A flag to change the grouping of the generated THIRD-PARTY file. |
protected String |
includedArtifacts
A filter to include only some ArtifactsIds |
protected String |
includedGroups
A filter to include only some GroupIds |
protected String |
includedScopes
A filter to include only some scopes, if let empty then all scopes will be used (no filter). |
protected boolean |
includeTransitiveDependencies
Include transitive dependencies when downloading license files. |
protected List<String> |
licenseMerges
To merge licenses in final file. |
protected File |
missingFile
The file where to fill the license for dependencies with unknown license. |
static String |
NO_DEPENDENCIES_MESSAGE
|
protected File |
outputDirectory
Directory where to generate files. |
protected String |
thirdPartyFilename
File where license information for third party dependencies gets stored |
protected boolean |
useMissingFile
A flag to use the missing licenses file to consolidate the THID-PARTY file. |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractAddThirdPartyMojo()
|
Methods inherited from class org.codehaus.mojo.license.AbstractLicenseMojo |
---|
acceptPackaging, addResourceDir, afterExecute, checkEncoding, checkPackaging, checkSkip, doAction, 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 outputDirectory
protected String thirdPartyFilename
protected boolean useMissingFile
protected File missingFile
protected String artifactLicenseMapping
protected List<String> licenseMerges
|
.
Example :
<licenseMerges> <licenseMerge>The Apache Software License|Version 2.0,Apache License, Version 2.0</licenseMerge> </licenseMerges> </pre>
protected String bundleThirdPartyPath
generateBundle
is on.
Note: This option is not available for pom
module types.
protected boolean generateBundle
bundleThirdPartyPath
location.
protected boolean force
protected boolean failIfWarning
protected boolean groupByLicense
true
, the it will group by license type.
protected String excludedScopes
protected String includedScopes
protected String excludedGroups
protected String includedGroups
protected String excludedArtifacts
protected String includedArtifacts
protected boolean includeTransitiveDependencies
public static final String NO_DEPENDENCIES_MESSAGE
Constructor Detail |
---|
public AbstractAddThirdPartyMojo()
Method Detail |
---|
public static SortedMap<String,org.apache.maven.project.MavenProject> getArtifactCache()
protected abstract SortedMap<String,org.apache.maven.project.MavenProject> loadDependencies()
protected abstract SortedProperties createUnsafeMapping() throws org.apache.maven.project.ProjectBuildingException, IOException, ThirdPartyToolException
org.apache.maven.project.ProjectBuildingException
IOException
ThirdPartyToolException
protected boolean exists(String location)
protected InputStream getInputStream(String location) throws IOException
IOException
protected File copyToFileSystem(String location)
protected File copyToFileSystem(String location, File file)
protected void init() throws Exception
AbstractLicenseMojo
AbstractLicenseMojo.doAction()
method.
init
in class AbstractLicenseMojo
Exception
- if anyprotected LicenseMap createLicenseMap(SortedMap<String,org.apache.maven.project.MavenProject> dependencies)
protected boolean checkUnsafeDependencies()
protected void writeThirdPartyFile() throws IOException
IOException
public boolean isGroupByLicense()
public void setGroupByLicense(boolean groupByLicense)
public File getOutputDirectory()
public String getThirdPartyFilename()
public String getBundleThirdPartyPath()
public boolean isGenerateBundle()
public boolean isFailIfWarning()
public SortedMap<String,org.apache.maven.project.MavenProject> getProjectDependencies()
public SortedSet<org.apache.maven.project.MavenProject> getUnsafeDependencies()
public void setUnsafeDependencies(SortedSet<org.apache.maven.project.MavenProject> unsafeDependencies)
public File getThirdPartyFile()
public LicenseMap getLicenseMap()
public void setOutputDirectory(File outputDirectory)
public void setThirdPartyFilename(String thirdPartyFilename)
public void setBundleThirdPartyPath(String bundleThirdPartyPath)
public void setGenerateBundle(boolean generateBundle)
public void setThirdPartyFile(File thirdPartyFile)
public boolean isUseMissingFile()
public File getMissingFile()
public void setUseMissingFile(boolean useMissingFile)
public void setMissingFile(File missingFile)
public void setFailIfWarning(boolean failIfWarning)
public SortedProperties getUnsafeMappings()
public boolean isForce()
public boolean isDoGenerate()
public void setForce(boolean force)
public void setDoGenerate(boolean doGenerate)
public boolean isDoGenerateBundle()
public void setDoGenerateBundle(boolean doGenerateBundle)
public List<String> getExcludedScopes()
public void setExcludedScopes(String excludedScopes)
public List<String> getIncludedScopes()
public void setIncludedScopes(String includedScopes)
public String getExcludedGroups()
public void setExcludedGroups(String excludedGroups)
public String getIncludedGroups()
public void setIncludedGroups(String includedGroups)
public String getExcludedArtifacts()
public void setExcludedArtifacts(String excludedArtifacts)
public String getIncludedArtifacts()
public void setIncludedArtifacts(String includedArtifacts)
public ThirdPartyTool getThirdPartyTool()
public void setThirdPartyTool(ThirdPartyTool thridPartyTool)
public String getArtifactLicenseMapping()
public void setArtifactLicenseMapping(String artifactLicenseMapping)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |