|
||||||||||
| 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
public abstract class AbstractPlugin
Un MOJO de base pour les autres MOJO concrets avec les options communes.
| Field Summary | |
|---|---|
protected java.lang.String |
skipAfterInitMessage
|
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
protected |
AbstractPlugin(java.lang.String skipAfterInitMessage)
|
| Method Summary | |
|---|---|
protected void |
addCompileSourceRoots(java.io.File srcDir)
|
protected void |
addResourceDir(java.lang.String dir)
|
protected void |
addTestCompileSourceRoots(java.io.File srcDir)
|
protected void |
addTestResourceDir(java.lang.String dir)
|
protected void |
copyFile(java.io.File srcFile,
java.io.File destFile)
Does the actual copy of the file and logging. |
protected void |
copyFile(java.lang.String content,
java.io.File destFile,
java.lang.String encoding)
Does the actual copy of the content to a fileand logging. |
protected abstract void |
doAction()
Do plugin action. |
protected abstract boolean |
ensurePackaging()
|
void |
execute()
|
protected java.util.Map<java.lang.String,java.lang.String> |
getFilesToTreate(java.lang.String[] includes,
java.lang.String[] excludes,
java.io.File srcDir,
MirroredFileUpdater updater)
|
protected void |
getFilesToTreateForRoots(java.lang.String[] includes,
java.lang.String[] excludes,
java.util.List<java.lang.String> roots,
java.util.Map<java.io.File,java.lang.String[]> files,
MirroredFileUpdater updater)
|
abstract org.apache.maven.project.MavenProject |
getProject()
|
protected abstract boolean |
init()
la methode qui est lancee au debut de la methode execute() pour preparer l'init du goal. |
protected java.net.URLClassLoader |
initClassLoader(org.apache.maven.project.MavenProject project,
java.io.File src,
boolean addSourcesToClassPath,
boolean testPhase,
boolean addResourcesToClassPath,
boolean addCompileClassPath,
boolean addProjectClassPath)
|
protected boolean |
isFileNewerThanPomFile(java.io.File f)
Test if a file exists and is newer than the pom file. |
abstract boolean |
isVerbose()
|
protected void |
removeCompileSourceRoots(java.io.File srcDir)
|
protected void |
removeTestCompileSourceRoots(java.io.File srcDir)
|
abstract void |
setProject(org.apache.maven.project.MavenProject project)
|
abstract void |
setVerbose(boolean verbose)
|
void |
writeFile(java.io.File destFile,
java.lang.String content,
java.lang.String encoding)
|
| 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 |
| Field Detail |
|---|
protected final java.lang.String skipAfterInitMessage
| Constructor Detail |
|---|
protected AbstractPlugin(java.lang.String skipAfterInitMessage)
| Method Detail |
|---|
protected abstract boolean ensurePackaging()
protected abstract boolean init()
throws java.lang.Exception
execute() pour preparer l'init du goal.
true if there is something to generate, false otherwise.
java.lang.Exception - if any
protected abstract void doAction()
throws java.lang.Exception
execute() invoke this method only and only if :
ensurePackaging() returns false (filtrer project type, for example).init() returns true.
java.lang.Exception - if any
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureExceptionpublic abstract org.apache.maven.project.MavenProject getProject()
public abstract void setProject(org.apache.maven.project.MavenProject project)
public abstract boolean isVerbose()
public abstract void setVerbose(boolean verbose)
protected void copyFile(java.io.File srcFile,
java.io.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(java.lang.String content,
java.io.File destFile,
java.lang.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(java.io.File destFile,
java.lang.String content,
java.lang.String encoding)
throws java.io.IOException
java.io.IOExceptionprotected boolean isFileNewerThanPomFile(java.io.File f)
f - the file to test
true if file exists and is newer than the pom file,
false otherwise.
protected void getFilesToTreateForRoots(java.lang.String[] includes,
java.lang.String[] excludes,
java.util.List<java.lang.String> roots,
java.util.Map<java.io.File,java.lang.String[]> files,
MirroredFileUpdater updater)
protected java.util.Map<java.lang.String,java.lang.String> getFilesToTreate(java.lang.String[] includes,
java.lang.String[] excludes,
java.io.File srcDir,
MirroredFileUpdater updater)
protected void addCompileSourceRoots(java.io.File srcDir)
protected void removeCompileSourceRoots(java.io.File srcDir)
protected void addTestCompileSourceRoots(java.io.File srcDir)
protected void removeTestCompileSourceRoots(java.io.File srcDir)
protected void addResourceDir(java.lang.String dir)
protected void addTestResourceDir(java.lang.String dir)
protected java.net.URLClassLoader initClassLoader(org.apache.maven.project.MavenProject project,
java.io.File src,
boolean addSourcesToClassPath,
boolean testPhase,
boolean addResourcesToClassPath,
boolean addCompileClassPath,
boolean addProjectClassPath)
throws java.net.MalformedURLException
java.net.MalformedURLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||