|
||||||||||
| 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.AbstractPlugin
AbstractPlugin
@Deprecated public abstract class AbstractPlugin
Un MOJO de base pour les autres MOJO concrets avec les options communes.
| 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 |
|---|
protected final String skipAfterInitMessage
| Constructor Detail |
|---|
protected AbstractPlugin(String skipAfterInitMessage)
| Method Detail |
|---|
protected abstract boolean ensurePackaging()
protected abstract boolean init()
throws Exception
execute() pour preparer l'init du goal.
true if there is something to generate, false otherwise.
Exception - if any
protected abstract void doAction()
throws Exception
execute() invoke this method only and only if :
ensurePackaging() returns false (filtrer project type, for example).init() returns true.
Exception - if any
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
execute in interface org.apache.maven.plugin.Mojoorg.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected void copyFile(File srcFile,
File destFile)
throws org.apache.maven.plugin.MojoExecutionException
srcFile - represents the file to copy.destFile - file name of destination file.
org.apache.maven.plugin.MojoExecutionException - with a message if an
error occurs.
protected void copyFile(String content,
File destFile,
String encoding)
throws org.apache.maven.plugin.MojoExecutionException
content - represents the content to writeFile into file.destFile - file name of destination file.encoding - encoding to use to writeFile file
org.apache.maven.plugin.MojoExecutionException - with a message if an
error occurs.
public void writeFile(File destFile,
String content,
String encoding)
throws IOException
IOExceptionprotected boolean isFileNewerThanPomFile(File f)
f - the file to test
true if file exists and is newer than the pom file,
false otherwise.
protected void getFilesToTreateForRoots(String[] includes,
String[] excludes,
List<String> roots,
Map<File,String[]> files,
MirroredFileUpdater updater)
protected Map<String,String> getFilesToTreate(String[] includes,
String[] excludes,
File srcDir,
MirroredFileUpdater updater)
protected void addCompileSourceRoots(File srcDir)
protected void removeCompileSourceRoots(File srcDir)
protected void addTestCompileSourceRoots(File srcDir)
protected void removeTestCompileSourceRoots(File srcDir)
protected void addResourceDir(String dir)
protected void addTestResourceDir(String dir)
protected URLClassLoader initClassLoader(org.apache.maven.project.MavenProject project,
File src,
boolean addSourcesToClassPath,
boolean testPhase,
boolean addResourcesToClassPath,
boolean addCompileClassPath,
boolean addProjectClassPath)
throws MalformedURLException
MalformedURLException
protected URL getTemplate(File f)
throws IOException
f - le fichier de template
IOException - pour toute erreur de recherche
protected void checkResource(File f)
throws IOException
f - le fichier que l'on veut vérifié
IOException - pour tout erreur de recherche
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||