|
||||||||||
| 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.AddThirdPartyMojo
public class AddThirdPartyMojo
Le goal pour copier le fichier THIRD-PARTY.txt (contenant les licenses de toutes les dependances du projet) dans le classpath (et le generer s'il n'existe pas).
AddThirdPartyFileMojo).| Nested Class Summary | |
|---|---|
protected class |
AddThirdPartyMojo.LicenseMap
|
| Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin |
|---|
org.nuiton.plugin.Plugin.InitState, org.nuiton.plugin.Plugin.Packaging |
| Field Summary | |
|---|---|
protected org.apache.maven.artifact.metadata.ArtifactMetadataSource |
artifactMetadataSource
Artifact metadata source component. |
protected String |
bundleThirdPartyPath
The path of the bundled third party file to produce when generateBundle is on. |
protected org.apache.maven.artifact.resolver.ArtifactCollector |
collector
Artifact collector component. |
protected boolean |
copyToMETA_INF
Deprecated. since 2.2 (use instead generateBundle). |
protected org.apache.maven.shared.dependency.tree.DependencyTreeBuilder |
dependencyTreeBuilder
Dependency tree builder component. |
protected org.apache.maven.artifact.factory.ArtifactFactory |
factory
Artifact Factory component. |
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 |
keepBackup
Un flag pour conserver un backup des fichiers modifies. |
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepository
Local Repository. |
protected org.apache.maven.project.MavenProjectBuilder |
mavenProjectBuilder
Maven Project Builder component. |
static String |
NO_DEPENDENCIES_MESSAGE
|
protected File |
outputDirectory
Repertoire de sortie des classes (classpath). |
protected List<?> |
remoteRepositories
Remote repositories used for the project. |
protected File |
thirdPartyFile
|
protected String |
thirdPartyFileContent
content of third party file (only computed if force is active or
the thirdPartyFile does not exist, or is not up-to-date. |
protected String |
thirdPartyFilename
Fichier ou ecrire les licences des dependances. |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
AddThirdPartyMojo()
|
|
| Method Summary | |
|---|---|
protected void |
buildLicenseMap(org.apache.maven.shared.dependency.tree.DependencyNode node,
AddThirdPartyMojo.LicenseMap licenseMap)
|
protected String |
buildThirdPartyFilecontent()
|
protected boolean |
checkPackaging()
|
protected void |
doAction()
|
protected String |
getArtifactName(org.apache.maven.project.MavenProject artifactProject)
|
String |
getBundleThirdPartyPath()
|
protected org.apache.maven.project.MavenProject |
getMavenProjectFromRepository(org.apache.maven.artifact.Artifact artifact)
Get the Maven project from the repository depending the
Artifact given. |
File |
getOutputDirectory()
|
File |
getThirdPartyFile()
|
String |
getThirdPartyFileContent()
|
String |
getThirdPartyFilename()
|
static String |
getUnknownLicenseMessage()
|
protected void |
init()
|
boolean |
isDoGenerate()
|
boolean |
isForce()
|
boolean |
isGenerateBundle()
|
boolean |
isKeepBackup()
|
void |
setBundleThirdPartyPath(String bundleThirdPartyPath)
|
void |
setDoGenerate(boolean doGenerate)
|
void |
setForce(boolean force)
|
void |
setGenerateBundle(boolean generateBundle)
|
void |
setKeepBackup(boolean keepBackup)
|
void |
setOutputDirectory(File outputDirectory)
|
void |
setThirdPartyFile(File thirdPartyFile)
|
void |
setThirdPartyFileContent(String thirdPartyFileContent)
|
void |
setThirdPartyFilename(String thirdPartyFilename)
|
| Methods inherited from class org.nuiton.license.plugin.AbstractLicenseMojo |
|---|
createLicenseStore, getEncoding, getProject, hasClassPath, isVerbose, setEncoding, setProject, setVerbose |
| Methods inherited from class org.nuiton.plugin.AbstractPlugin |
|---|
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkResource, checkRunOnceDone, checkSkip, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getTemplate, 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.apache.maven.plugin.Mojo |
|---|
getLog, setLog |
| Field Detail |
|---|
protected File outputDirectory
protected String thirdPartyFilename
protected boolean generateBundle
protected String bundleThirdPartyPath
generateBundle is on.
Note: This option is not available for pom module types.
protected boolean force
protected boolean keepBackup
@Deprecated protected boolean copyToMETA_INF
generateBundle).
protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
protected List<?> remoteRepositories
protected org.apache.maven.shared.dependency.tree.DependencyTreeBuilder dependencyTreeBuilder
protected org.apache.maven.artifact.factory.ArtifactFactory factory
protected org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
protected org.apache.maven.artifact.resolver.ArtifactCollector collector
protected org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder
protected String thirdPartyFileContent
force is active or
the thirdPartyFile does not exist, or is not up-to-date.
protected File thirdPartyFile
public static final String NO_DEPENDENCIES_MESSAGE
| Constructor Detail |
|---|
public AddThirdPartyMojo()
| Method Detail |
|---|
protected boolean checkPackaging()
checkPackaging in class org.nuiton.plugin.AbstractPlugin
protected void init()
throws Exception
init in class org.nuiton.plugin.AbstractPluginException
protected void doAction()
throws Exception
doAction in class org.nuiton.plugin.AbstractPluginException
protected String buildThirdPartyFilecontent()
throws org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException
org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException
protected void buildLicenseMap(org.apache.maven.shared.dependency.tree.DependencyNode node,
AddThirdPartyMojo.LicenseMap licenseMap)
protected String getArtifactName(org.apache.maven.project.MavenProject artifactProject)
protected org.apache.maven.project.MavenProject getMavenProjectFromRepository(org.apache.maven.artifact.Artifact artifact)
throws org.apache.maven.project.ProjectBuildingException
Maven project from the repository depending the
Artifact given.
artifact - an artifact
org.apache.maven.project.ProjectBuildingException - if anypublic static String getUnknownLicenseMessage()
public String getThirdPartyFilename()
public File getOutputDirectory()
public boolean isForce()
public boolean isKeepBackup()
public boolean isGenerateBundle()
public boolean isDoGenerate()
public String getBundleThirdPartyPath()
public File getThirdPartyFile()
public String getThirdPartyFileContent()
public void setThirdPartyFilename(String thirdPartyFilename)
public void setForce(boolean force)
public void setOutputDirectory(File outputDirectory)
public void setKeepBackup(boolean keepBackup)
public void setGenerateBundle(boolean generateBundle)
public void setBundleThirdPartyPath(String bundleThirdPartyPath)
public void setThirdPartyFileContent(String thirdPartyFileContent)
public void setDoGenerate(boolean doGenerate)
public void setThirdPartyFile(File thirdPartyFile)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||