org.nuiton
Class AbstractPlugin

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

Deprecated. since 1.0.3, prefer use AbstractPlugin

@Deprecated
public abstract class AbstractPlugin
extends org.apache.maven.plugin.AbstractMojo
implements Plugin

Un MOJO de base pour les autres MOJO concrets avec les options communes.

Author:
chemit

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin
Plugin.Packaging
 
Field Summary
protected  String skipAfterInitMessage
          Deprecated.  
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
protected AbstractPlugin(String skipAfterInitMessage)
          Deprecated.  
 
Method Summary
protected  void addCompileSourceRoots(File srcDir)
          Deprecated.  
protected  void addResourceDir(String dir)
          Deprecated.  
protected  void addTestCompileSourceRoots(File srcDir)
          Deprecated.  
protected  void addTestResourceDir(String dir)
          Deprecated.  
protected  void checkResource(File f)
          Deprecated. Vérifie que le fichier donné existe bien (sur le filesystem ou dans le class-path).
protected  void copyFile(File srcFile, File destFile)
          Deprecated. Does the actual copy of the file and logging.
protected  void copyFile(String content, File destFile, String encoding)
          Deprecated. Does the actual copy of the content to a fileand logging.
protected abstract  void doAction()
          Deprecated. Do plugin action.
protected abstract  boolean ensurePackaging()
          Deprecated.  
 void execute()
          Deprecated.  
protected  Map<String,String> getFilesToTreate(String[] includes, String[] excludes, File srcDir, MirroredFileUpdater updater)
          Deprecated.  
protected  void getFilesToTreateForRoots(String[] includes, String[] excludes, List<String> roots, Map<File,String[]> files, MirroredFileUpdater updater)
          Deprecated.  
protected  URL getTemplate(File f)
          Deprecated.  
protected abstract  boolean init()
          Deprecated. la methode qui est lancee au debut de la methode execute() pour preparer l'init du goal.
protected  URLClassLoader initClassLoader(org.apache.maven.project.MavenProject project, File src, boolean addSourcesToClassPath, boolean testPhase, boolean addResourcesToClassPath, boolean addCompileClassPath, boolean addProjectClassPath)
          Deprecated.  
protected  boolean isFileNewerThanPomFile(File f)
          Deprecated. Test if a file exists and is newer than the pom file.
protected  void removeCompileSourceRoots(File srcDir)
          Deprecated.  
protected  void removeTestCompileSourceRoots(File srcDir)
          Deprecated.  
 void writeFile(File destFile, String content, String encoding)
          Deprecated.  
 
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
getLog, setLog
 

Field Detail

skipAfterInitMessage

protected final String skipAfterInitMessage
Deprecated. 
Constructor Detail

AbstractPlugin

protected AbstractPlugin(String skipAfterInitMessage)
Deprecated. 
Method Detail

ensurePackaging

protected abstract boolean ensurePackaging()
Deprecated. 

init

protected abstract boolean init()
                         throws Exception
Deprecated. 
la methode qui est lancee au debut de la methode execute() pour preparer l'init du goal.

Returns:
true if there is something to generate, false otherwise.
Throws:
Exception - if any

doAction

protected abstract void doAction()
                          throws Exception
Deprecated. 
Do plugin action.

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

Throws:
Exception - if any

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Deprecated. 
Specified by:
execute in interface org.apache.maven.plugin.Mojo
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

copyFile

protected void copyFile(File srcFile,
                        File destFile)
                 throws org.apache.maven.plugin.MojoExecutionException
Deprecated. 
Does the actual copy of the file and logging.

Parameters:
srcFile - represents the file to copy.
destFile - file name of destination file.
Throws:
org.apache.maven.plugin.MojoExecutionException - with a message if an error occurs.

copyFile

protected void copyFile(String content,
                        File destFile,
                        String encoding)
                 throws org.apache.maven.plugin.MojoExecutionException
Deprecated. 
Does the actual copy of the content to a fileand logging.

Parameters:
content - represents the content to writeFile into file.
destFile - file name of destination file.
encoding - encoding to use to writeFile file
Throws:
org.apache.maven.plugin.MojoExecutionException - with a message if an error occurs.

writeFile

public void writeFile(File destFile,
                      String content,
                      String encoding)
               throws IOException
Deprecated. 
Throws:
IOException

isFileNewerThanPomFile

protected boolean isFileNewerThanPomFile(File f)
Deprecated. 
Test if a file exists and is newer than the pom file.

Parameters:
f - the file to test
Returns:
true if file exists and is newer than the pom file, false otherwise.

getFilesToTreateForRoots

protected void getFilesToTreateForRoots(String[] includes,
                                        String[] excludes,
                                        List<String> roots,
                                        Map<File,String[]> files,
                                        MirroredFileUpdater updater)
Deprecated. 

getFilesToTreate

protected Map<String,String> getFilesToTreate(String[] includes,
                                              String[] excludes,
                                              File srcDir,
                                              MirroredFileUpdater updater)
Deprecated. 

addCompileSourceRoots

protected void addCompileSourceRoots(File srcDir)
Deprecated. 

removeCompileSourceRoots

protected void removeCompileSourceRoots(File srcDir)
Deprecated. 

addTestCompileSourceRoots

protected void addTestCompileSourceRoots(File srcDir)
Deprecated. 

removeTestCompileSourceRoots

protected void removeTestCompileSourceRoots(File srcDir)
Deprecated. 

addResourceDir

protected void addResourceDir(String dir)
Deprecated. 

addTestResourceDir

protected void addTestResourceDir(String dir)
Deprecated. 

initClassLoader

protected URLClassLoader initClassLoader(org.apache.maven.project.MavenProject project,
                                         File src,
                                         boolean addSourcesToClassPath,
                                         boolean testPhase,
                                         boolean addResourcesToClassPath,
                                         boolean addCompileClassPath,
                                         boolean addProjectClassPath)
                                  throws MalformedURLException
Deprecated. 
Throws:
MalformedURLException

getTemplate

protected URL getTemplate(File f)
                   throws IOException
Deprecated. 
Parameters:
f - le fichier de template
Returns:
l'url du fichier demande
Throws:
IOException - pour toute erreur de recherche

checkResource

protected void checkResource(File f)
                      throws IOException
Deprecated. 
Vérifie que le fichier donné existe bien (sur le filesystem ou dans le class-path).

Parameters:
f - le fichier que l'on veut vérifié
Throws:
IOException - pour tout erreur de recherche


Copyright © 2009 CodeLutin. All Rights Reserved.