|
||||||||||
| 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.UpdateHeaderMojo
public class UpdateHeaderMojo
The goal to update (or add) the licence header on some files.
| 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 Map<String,HeaderGenerator> |
_generators
All available generators |
protected String |
boxedLicenseHeaderContent
le header complet (avec les balises de commentaires) |
protected List<String> |
compileSourceRoots
Repertoires des fichiers sources a traiter. |
protected boolean |
dryRun
A flag to test plugin but modify no file. |
protected String |
encoding
Encoding a utiliser pour lire et ecrire les fichiers. |
protected String |
excludes
La liste des patterns de fichiers à exclure (séparés par des virgules). |
protected Map<File,String[]> |
filesToTreate
la liste des chemin relatifs des sources java a traiter pour chaque repertoire contenant des sources |
protected String |
generatorName
Le type de générateur a utiliser pour encapsuler le header. |
protected String |
inceptionYear
l'annee de creation du module (sera place dans le header) |
protected String |
includes
La liste des patterns de fichiers à inclure (séparés par des virgules). |
protected boolean |
keepBackup
Un flag pour conserver un backup des fichiers modifies. |
protected String |
licenseHeaderContent
le header a ajouter dans chaque fichier source java |
protected String |
licenseName
Le type de license a appliquer. |
protected String |
licenseResolver
Un resolver externe |
protected String |
organizationName
le nom de l'organisation (sera place dans le header) |
protected org.apache.maven.project.MavenProject |
project
Dependance du projet. |
protected String |
projectName
le nom du projet (sera place dans le header) |
protected boolean |
skipUpdateHeader
A flag to skip the goal. |
protected String |
template
La template (velocity) a utiliser pour construire le header. |
protected Map<String,String> |
templateParameters
Des paramètres supplémentaires à utiliser dans la template du header. |
protected List<String> |
testCompileSourceRoots
Repertoires des fichiers sources de test a traiter. |
protected long |
timestamp
le timestamp utilise pour la generation |
protected org.codehaus.plexus.velocity.VelocityComponent |
velocity
Velocity Component. |
protected boolean |
verbose
Un flag pour activer le mode verbeux. |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
UpdateHeaderMojo()
|
|
| Method Summary | |
|---|---|
boolean |
checkPackaging()
|
protected boolean |
checkSkip()
|
protected String |
computeHeader(License license,
HeaderGenerator generator)
Construction du header a utiliser. |
protected void |
doAction()
|
org.apache.maven.project.MavenProject |
getProject()
|
void |
init()
|
boolean |
isVerbose()
|
void |
setProject(org.apache.maven.project.MavenProject project)
|
void |
setVerbose(boolean verbose)
|
| Methods inherited from class org.nuiton.plugin.AbstractPlugin |
|---|
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkResource, checkRunOnceDone, 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 org.apache.maven.project.MavenProject project
protected String encoding
protected String inceptionYear
protected String organizationName
protected String projectName
protected String licenseName
protected String generatorName
protected String includes
**\/*.java,**\/*.properties
On recherchera alors les fichiers respectant l'un des patterns dans
tous les répertoires de sources et de tests.
Par défaut, on veut utiliser le plugin sur des fichiers sources java.
protected String excludes
**\/*.java,**\/*.properties
On recherchera alors les fichiers respectant l'un des patterns dans
tous les répertoires de sources et de tests.
Par défaut, on n'exclue rien.
protected List<String> compileSourceRoots
protected List<String> testCompileSourceRoots
protected String licenseResolver
protected String template
protected Map<String,String> templateParameters
protected boolean keepBackup
protected boolean verbose
protected boolean skipUpdateHeader
protected boolean dryRun
protected org.codehaus.plexus.velocity.VelocityComponent velocity
protected Map<String,HeaderGenerator> _generators
protected String licenseHeaderContent
protected String boxedLicenseHeaderContent
protected Map<File,String[]> filesToTreate
protected long timestamp
| Constructor Detail |
|---|
public UpdateHeaderMojo()
| Method Detail |
|---|
public boolean isVerbose()
public void setVerbose(boolean verbose)
public org.apache.maven.project.MavenProject getProject()
public void setProject(org.apache.maven.project.MavenProject project)
public boolean checkPackaging()
checkPackaging in class org.nuiton.plugin.AbstractPluginprotected boolean checkSkip()
checkSkip in class org.nuiton.plugin.AbstractPlugin
public 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 computeHeader(License license,
HeaderGenerator generator)
throws Exception
license - the license to use to compute headergenerator - the header generator used to compute header
Exception - pour toute erreur pendant la construction du header
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||