|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.freeform.mojo.GenerateNetbeansProjectMojo
public class GenerateNetbeansProjectMojo
A Maven2 plugin which integrates the use of Maven2 with Netbeans 4.x.
| Field Summary | |
|---|---|
protected java.lang.String |
additionalFiles
A comma separated list of additional files to view. |
protected java.lang.String |
additionalFolders
A comma separated list of additionnal folders to view. |
protected java.lang.String |
additionalGoals
A comma separated list of additional goals to call from Netbeans. |
protected org.apache.maven.project.MavenProject |
executedProject
The currently executed project. |
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepository
Local maven repository. |
protected java.lang.String |
mavenpath
The path to the Maven executable. |
protected java.lang.String |
outputDirectory
The directory where to write the nbproject directory and Netbeans project files. |
protected org.apache.maven.project.MavenProject |
project
The project whose project files to create. |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
GenerateNetbeansProjectMojo()
|
|
| Method Summary | |
|---|---|
protected void |
addAdditionalActions(Analyser analyser)
This method adds the List of actions defined in the additionalGoals attribute to the given analyser. |
protected void |
addAdditionalFiles(Analyser analyser)
This method adds the List of files defined in the additionalFiles attribute to the given analyser. |
protected void |
addAdditionalFolders(Analyser analyser)
This method adds the List of folders defined in the additionalFolders attribute to the given analyser. |
protected void |
addAdditionalTargets(Analyser analyser)
This method adds the List of ant targets defined in the additionalGoals attribute to the given analyser. |
protected Analyser |
analyse()
This method creates the Analyser for the MavenProject then calls analyseProject and analyseTargets on it. |
protected java.io.File |
createNetbeansProjectDirectory()
This methods creates the nbproject directory that will hold the netbeans descriptor file and ant script. |
void |
execute()
This method is the starting method of this class. |
void |
setAdditionalFiles(java.lang.String additionalFiles)
Setter for the additionalFiles property. |
void |
setAdditionalFolders(java.lang.String additionalFolders)
Setter for the additionalFolders property. |
void |
setAdditionalGoals(java.lang.String additionalGoals)
Setter for the additionalGoals property. |
void |
setExecutedProject(org.apache.maven.project.MavenProject executedProject)
Setter for property executedProject. |
void |
setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
Setter for property localRepository. |
void |
setMavenPath(java.lang.String mavenpath)
Setter for property mavenpath. |
void |
setOutputDirectory(java.lang.String outputDirectory)
Setter for the outputDirectory property. |
void |
setProject(org.apache.maven.project.MavenProject project)
Setter for property project. |
protected void |
writeMavencallFile(java.io.File netbeansProjectDirectory,
boolean useOutputDirectory,
java.util.List antTargets)
This method write the mavencall.xml file given the directory where to save the file and the list of AntTarget to write in. |
protected void |
writeProjectFile(java.io.File netbeansProjectDirectory,
FreeformProject freeformProject)
This method write the project.xml file given the directory where to save the file and the FreeformProject to write in. |
protected void |
writePropertyFile(java.io.File netbeansProjectDirectory,
java.lang.String repositoryBasedir)
This method write the project.properties file given the directory where to save the file and the FreeformProject to write in. |
| 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 org.apache.maven.artifact.repository.ArtifactRepository localRepository
protected org.apache.maven.project.MavenProject executedProject
protected org.apache.maven.project.MavenProject project
protected java.lang.String additionalFiles
protected java.lang.String additionalFolders
protected java.lang.String additionalGoals
protected java.lang.String mavenpath
protected java.lang.String outputDirectory
| Constructor Detail |
|---|
public GenerateNetbeansProjectMojo()
| Method Detail |
|---|
public void setOutputDirectory(java.lang.String outputDirectory)
outputDirectory - The new outputDirectory.public void setAdditionalFiles(java.lang.String additionalFiles)
additionalFiles - The new additionalFiles.public void setAdditionalFolders(java.lang.String additionalFolders)
additionalFolders - The new additionalFolders.public void setAdditionalGoals(java.lang.String additionalGoals)
additionalGoals - The new additionalGoals.public void setExecutedProject(org.apache.maven.project.MavenProject executedProject)
executedProject - New value of property executedProject.public void setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
localRepository - New value of property localRepository.public void setProject(org.apache.maven.project.MavenProject project)
project - New value of property project.public void setMavenPath(java.lang.String mavenpath)
mavenpath - New value of property mavenpath.
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - if something goes wrong. That Exception will be wrapped on any
FreeformPluginException thrown during the plugin execution.
protected void addAdditionalActions(Analyser analyser)
throws FreeformPluginException
analyser - The analyser to add the actions in.
FreeformPluginException - if something goes wrong.
protected void addAdditionalFiles(Analyser analyser)
throws FreeformPluginException
analyser - The analyser to add the files in.
FreeformPluginException - if something goes wrong.
protected void addAdditionalFolders(Analyser analyser)
throws FreeformPluginException
analyser - The analyser to add the folders in.
FreeformPluginException - if something goes wrong.
protected void addAdditionalTargets(Analyser analyser)
throws FreeformPluginException
analyser - The analyser to add the tergets in.
FreeformPluginException - if something goes wrong.
protected Analyser analyse()
throws FreeformPluginException
FreeformPluginException - if something goes wrong.
protected java.io.File createNetbeansProjectDirectory()
throws FreeformPluginException
FreeformPluginException - if something goes wrong.
protected void writeMavencallFile(java.io.File netbeansProjectDirectory,
boolean useOutputDirectory,
java.util.List antTargets)
throws FreeformPluginException
useOutputDirectory - whether the project elements contains reference to the project directory or not.netbeansProjectDirectory - The directory to write the mavencall.xml
file.antTargets - The list of AntTarget to write in the file.
FreeformPluginException - if something goes wrong.
protected void writeProjectFile(java.io.File netbeansProjectDirectory,
FreeformProject freeformProject)
throws FreeformPluginException
netbeansProjectDirectory - The directory to write the mavencall.xml
file.freeformProject - The FreeformProject to write in the file.
FreeformPluginException - if something goes wrong.
protected void writePropertyFile(java.io.File netbeansProjectDirectory,
java.lang.String repositoryBasedir)
throws FreeformPluginException
repositoryBasedir - Not used.netbeansProjectDirectory - The directory to write the mavencall.xml
file.
FreeformPluginException - if something goes wrong.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||