|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.nuiton.plugin.AbstractPlugin
org.nuiton.license.plugin.AbstractLicenseMojo
org.nuiton.license.plugin.AbstractAddThirdPartyMojo
public abstract class AbstractAddThirdPartyMojo
Goal to generate the THIRD-PARTY.txt file which resumes all dependencies with their licenses.
It also add it in class-path.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin |
|---|
org.nuiton.plugin.Plugin.InitState, org.nuiton.plugin.Plugin.Packaging |
| Field Summary | |
|---|---|
protected String |
bundleThirdPartyPath
The path of the bundled third party file to produce when generateBundle is on. |
protected boolean |
failIfWarning
A flag to fail the build if at least one dependency was detected without a license. |
protected boolean |
force
Un flag pour forcer la generation. |
protected boolean |
generateBundle
Un flag pour faire une copie nommé dans META-INF (prefixe avec le nom de l'artifact). |
protected boolean |
groupByLicense
A flag to change the grouping of the generated THIRD-PARTY file. |
protected List<String> |
licenseMerges
To merge licenses in final file. |
protected File |
missingFile
The file where to fill the license for dependencies with unknwon license. |
static String |
NO_DEPENDENCIES_MESSAGE
|
protected File |
outputDirectory
Repertoire de sortie des classes (classpath). |
protected String |
thirdPartyFilename
Fichier ou ecrire les licences des dependances. |
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()
|
|
| Method Summary | |
|---|---|
protected boolean |
checkUnsafeDependencies()
|
protected abstract LicenseMap |
createLicenseMap()
|
protected abstract org.nuiton.io.SortedProperties |
createUnsafeMapping()
|
static SortedMap<String,org.apache.maven.project.MavenProject> |
getArtifactCache()
|
static String |
getArtifactId(org.apache.maven.artifact.Artifact artifact)
|
static String |
getArtifactName(org.apache.maven.project.MavenProject project)
|
String |
getBundleThirdPartyPath()
|
String |
getEncoding()
|
LicenseMap |
getLicenseMap()
|
File |
getMissingFile()
|
File |
getOutputDirectory()
|
File |
getThirdPartyFile()
|
String |
getThirdPartyFilename()
|
SortedSet<org.apache.maven.project.MavenProject> |
getUnsafeDependencies()
|
org.nuiton.io.SortedProperties |
getUnsafeMappings()
|
protected void |
init()
|
boolean |
isDoGenerate()
|
boolean |
isDoGenerateBundle()
|
boolean |
isFailIfWarning()
|
boolean |
isForce()
|
boolean |
isGenerateBundle()
|
boolean |
isGroupByLicense()
|
boolean |
isUseMissingFile()
|
void |
setBundleThirdPartyPath(String bundleThirdPartyPath)
|
void |
setDoGenerate(boolean doGenerate)
|
void |
setDoGenerateBundle(boolean doGenerateBundle)
|
void |
setEncoding(String encoding)
|
void |
setFailIfWarning(boolean failIfWarning)
|
void |
setForce(boolean force)
|
void |
setGenerateBundle(boolean generateBundle)
|
void |
setGroupByLicense(boolean groupByLicense)
|
void |
setMissingFile(File missingFile)
|
void |
setOutputDirectory(File outputDirectory)
|
void |
setThirdPartyFile(File thirdPartyFile)
|
void |
setThirdPartyFilename(String thirdPartyFilename)
|
void |
setUseMissingFile(boolean useMissingFile)
|
protected void |
writeThirdPartyFile()
|
| Methods inherited from class org.nuiton.license.plugin.AbstractLicenseMojo |
|---|
createLicenseStore, getBuildTimestamp, getProject, getSession, isVerbose, setProject, setSession, setVerbose |
| Methods inherited from class org.nuiton.plugin.AbstractPlugin |
|---|
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkEncoding, checkPackaging, checkResource, checkRunOnceDone, checkSkip, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, doAction, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFile |
| 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.nuiton.plugin.Plugin |
|---|
getProject, isVerbose, setProject, setVerbose |
| Methods inherited from interface org.apache.maven.plugin.Mojo |
|---|
execute, getLog, setLog |
| Field Detail |
|---|
protected File outputDirectory
protected String thirdPartyFilename
protected boolean useMissingFile
protected File missingFile
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
protected boolean force
protected boolean failIfWarning
protected boolean groupByLicense
true, the it will group by license type.
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 LicenseMap createLicenseMap()
throws org.apache.maven.project.ProjectBuildingException
org.apache.maven.project.ProjectBuildingException
protected abstract org.nuiton.io.SortedProperties createUnsafeMapping()
throws org.apache.maven.project.ProjectBuildingException,
IOException
org.apache.maven.project.ProjectBuildingException
IOException
protected void init()
throws Exception
init in class org.nuiton.plugin.AbstractPluginExceptionprotected boolean checkUnsafeDependencies()
public static String getArtifactId(org.apache.maven.artifact.Artifact artifact)
public static String getArtifactName(org.apache.maven.project.MavenProject project)
protected void writeThirdPartyFile()
throws IOException
IOExceptionpublic final String getEncoding()
getEncoding in interface org.nuiton.plugin.PluginWithEncodingpublic final void setEncoding(String encoding)
setEncoding in interface org.nuiton.plugin.PluginWithEncodingpublic boolean isGroupByLicense()
public void setGroupByLicense(boolean groupByLicense)
public File getOutputDirectory()
public String getThirdPartyFilename()
public String getBundleThirdPartyPath()
public boolean isGenerateBundle()
public boolean isFailIfWarning()
public SortedSet<org.apache.maven.project.MavenProject> getUnsafeDependencies()
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 org.nuiton.io.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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||