org.nuiton.license.plugin
Class ThirdPartyPlugin

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.nuiton.plugin.AbstractPlugin
          extended by org.nuiton.license.plugin.ThirdPartyPlugin
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, Plugin

Deprecated. since 1.0.3, move all license stuff in maven-license-plugin (removed in 1.1.0)

@Deprecated
public class ThirdPartyPlugin
extends AbstractPlugin

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).

Author:
chemit
Is defined by the goal name:
add-third-party
Is bound to the specified phase of the standard build lifecycle:
generate-resources
Requires the dependencies in this specified scope:
test
Requires a Maven project to run:
true

Nested Class Summary
protected  class ThirdPartyPlugin.LicenseMap
          Deprecated.  
 
Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin
Plugin.Packaging
 
Field Summary
protected  org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
          Deprecated. Artifact metadata source component.
protected  org.apache.maven.artifact.resolver.ArtifactCollector collector
          Deprecated. Artifact collector component.
protected  boolean copyToMETA_INF
          Deprecated. Un flag pour farie une copie nommé dans META-INF (prefixe avec le nom de l'artifact).
protected  org.apache.maven.shared.dependency.tree.DependencyTreeBuilder dependencyTreeBuilder
          Deprecated. Dependency tree builder component.
protected  String encoding
          Deprecated. Encoding a utiliser pour lire et ecrire les fichiers.
protected  org.apache.maven.artifact.factory.ArtifactFactory factory
          Deprecated. Artifact Factory component.
protected  boolean force
          Deprecated. Un flag pour forcer la generation.
protected  boolean keepBackup
          Deprecated. Un flag pour conserver un backup des fichiers modifies.
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
          Deprecated. Local Repository.
protected  org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder
          Deprecated. Maven Project Builder component.
protected  File outputDirectory
          Deprecated. Repertoire de sortie des classes (classpath).
protected  org.apache.maven.project.MavenProject project
          Deprecated. Dependance du projet.
protected  List<?> remoteRepositories
          Deprecated. Remote repositories used for the project.
protected  File thirdPartyFile
          Deprecated.  
protected  String thirdPartyFileContent
          Deprecated. 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
          Deprecated. Fichier ou ecrire les licences des dependances.
protected  boolean verbose
          Deprecated. Un flag pour activer le mode verbeux.
 
Fields inherited from class org.nuiton.plugin.AbstractPlugin
skipAfterInitMessage
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ThirdPartyPlugin()
          Deprecated.  
 
Method Summary
protected  String buildGroupedLicenses(ThirdPartyPlugin.LicenseMap licenseMap)
          Deprecated.  
protected  void buildLicenseMap(org.apache.maven.shared.dependency.tree.DependencyNode node, ThirdPartyPlugin.LicenseMap licenseMap)
          Deprecated.  
protected  boolean checkPackaging()
          Deprecated. Check if the project packaging is acceptable for the mojo.
protected  void doAction()
          Deprecated. Do plugin action.
protected  String getArtifactName(org.apache.maven.project.MavenProject artifactProject)
          Deprecated.  
protected  org.apache.maven.project.MavenProject getMavenProjectFromRepository(org.apache.maven.artifact.Artifact artifact)
          Deprecated. Get the Maven project from the repository depending the Artifact given.
 org.apache.maven.project.MavenProject getProject()
          Deprecated.  
protected  boolean init()
          Deprecated. Method to initialize the mojo before doing any concrete actions.
 boolean isVerbose()
          Deprecated.  
protected  org.apache.maven.shared.dependency.tree.DependencyNode resolveProject()
          Deprecated.  
 void setProject(org.apache.maven.project.MavenProject project)
          Deprecated.  
 void setVerbose(boolean verbose)
          Deprecated.  
 
Methods inherited from class org.nuiton.plugin.AbstractPlugin
acceptPackaging, addCompileSourceRoots, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, checkResource, copyFile, execute, getFilesToTreate, getFilesToTreateForRoots, getTemplate, initClassLoader, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, 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

project

protected org.apache.maven.project.MavenProject project
Deprecated. 
Dependance du projet.

Since:
1.0.0
Is defined by:
default-value:
${project}
Is required.

thirdPartyFilename

protected String thirdPartyFilename
Deprecated. 
Fichier ou ecrire les licences des dependances.

Since:
1.0.0
Is defined by:
expression:
${helper.thirdPartyFilename}
default-value:
THIRD-PARTY.txt
Is required.

outputDirectory

protected File outputDirectory
Deprecated. 
Repertoire de sortie des classes (classpath).

Since:
1.0.0
Is defined by:
expression:
${helper.outputDirectory}
default-value:
target/generated-sources/resources
Is required.

encoding

protected String encoding
Deprecated. 
Encoding a utiliser pour lire et ecrire les fichiers.

Since:
1.0.0
Is defined by:
expression:
${helper.encoding}
default-value:
${project.build.sourceEncoding}
Is required.

force

protected boolean force
Deprecated. 
Un flag pour forcer la generation.

Since:
1.0.0
Is defined by:
expression:
${helper.force}
default-value:
false

keepBackup

protected boolean keepBackup
Deprecated. 
Un flag pour conserver un backup des fichiers modifies.

Since:
1.0.0
Is defined by:
expression:
${helper.keepBackup}
default-value:
false

copyToMETA_INF

protected boolean copyToMETA_INF
Deprecated. 
Un flag pour farie une copie nommé dans META-INF (prefixe avec le nom de l'artifact).

Since:
1.0.0
Is defined by:
expression:
${helper.copyToMETA_INF}
default-value:
false

verbose

protected boolean verbose
Deprecated. 
Un flag pour activer le mode verbeux.

Since:
1.0.0
Is defined by:
expression:
${helper.verbose}
default-value:
${maven.verbose}

localRepository

protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
Deprecated. 
Local Repository.

Since:
1.0.0
Is defined by:
expression:
${localRepository}
Is readonly.
Is required.

remoteRepositories

protected List<?> remoteRepositories
Deprecated. 
Remote repositories used for the project.

Since:
1.0.0
Is defined by:
expression:
${project.remoteArtifactRepositories}
Is readonly.
Is required.

dependencyTreeBuilder

protected org.apache.maven.shared.dependency.tree.DependencyTreeBuilder dependencyTreeBuilder
Deprecated. 
Dependency tree builder component.

Is a Plexus component defined by:

factory

protected org.apache.maven.artifact.factory.ArtifactFactory factory
Deprecated. 
Artifact Factory component.

Is a Plexus component defined by:

artifactMetadataSource

protected org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
Deprecated. 
Artifact metadata source component.

Is a Plexus component defined by:

collector

protected org.apache.maven.artifact.resolver.ArtifactCollector collector
Deprecated. 
Artifact collector component.

Is a Plexus component defined by:

mavenProjectBuilder

protected org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder
Deprecated. 
Maven Project Builder component.

Is a Plexus component defined by:

thirdPartyFileContent

protected String thirdPartyFileContent
Deprecated. 
content of third party file (only computed if force is active or the thirdPartyFile does not exist, or is not up-to-date.


thirdPartyFile

protected File thirdPartyFile
Deprecated. 
Constructor Detail

ThirdPartyPlugin

public ThirdPartyPlugin()
Deprecated. 
Method Detail

checkPackaging

protected boolean checkPackaging()
Deprecated. 
Description copied from class: AbstractPlugin
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 AbstractPlugin.execute().

Tip: There is two method to simplify the packaging check : AbstractPlugin.acceptPackaging(org.nuiton.plugin.Plugin.Packaging[]) and AbstractPlugin.rejectPackaging(org.nuiton.plugin.Plugin.Packaging[])

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

init

protected boolean init()
                throws Exception
Deprecated. 
Description copied from class: AbstractPlugin
Method to initialize the mojo before doing any concrete actions.

Note: The method is invoked before the AbstractPlugin.doAction() method.

Specified by:
init in class AbstractPlugin
Returns:
true if mojo is well initialize and something has to be done in the AbstractPlugin.doAction() method, false otherwise.
Throws:
Exception - if any

doAction

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

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

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

resolveProject

protected org.apache.maven.shared.dependency.tree.DependencyNode resolveProject()
Deprecated. 
Returns:
resolve the dependency tree

buildLicenseMap

protected void buildLicenseMap(org.apache.maven.shared.dependency.tree.DependencyNode node,
                               ThirdPartyPlugin.LicenseMap licenseMap)
Deprecated. 

buildGroupedLicenses

protected String buildGroupedLicenses(ThirdPartyPlugin.LicenseMap licenseMap)
Deprecated. 

getArtifactName

protected String getArtifactName(org.apache.maven.project.MavenProject artifactProject)
Deprecated. 

getMavenProjectFromRepository

protected org.apache.maven.project.MavenProject getMavenProjectFromRepository(org.apache.maven.artifact.Artifact artifact)
                                                                       throws org.apache.maven.project.ProjectBuildingException
Deprecated. 
Get the Maven project from the repository depending the Artifact given.

Parameters:
artifact - an artifact
Returns:
the Maven project for the given artifact
Throws:
org.apache.maven.project.ProjectBuildingException - if any

isVerbose

public boolean isVerbose()
Deprecated. 

setVerbose

public void setVerbose(boolean verbose)
Deprecated. 

getProject

public org.apache.maven.project.MavenProject getProject()
Deprecated. 

setProject

public void setProject(org.apache.maven.project.MavenProject project)
Deprecated. 


Copyright © 2009 CodeLutin. All Rights Reserved.