|
||||||||||
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
Integrate the use of Maven 2 with Netbeans 4.x.
Field Summary | |
---|---|
protected String |
additionalFiles
A comma separated list of additional files to view. |
protected String |
additionalFolders
A comma separated list of additionnal folders to view. |
protected 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 String |
mavenpath
The path to the Maven executable. |
protected 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 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(String additionalFiles)
Setter for the additionalFiles property. |
void |
setAdditionalFolders(String additionalFolders)
Setter for the additionalFolders property. |
void |
setAdditionalGoals(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(String mavenpath)
Setter for property mavenpath. |
void |
setOutputDirectory(String outputDirectory)
Setter for the outputDirectory property. |
void |
setProject(org.apache.maven.project.MavenProject project)
Setter for property project. |
protected void |
writeIdeFileTargetsFile(File netbeansProjectDirectory,
FreeformProject freeformProject)
This method writes the ide-file-targets.xml file given the directory where to save the file and the FreeformProject to write in. |
protected void |
writeMavencallFile(File netbeansProjectDirectory,
boolean useOutputDirectory,
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(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(File netbeansProjectDirectory,
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 String additionalFiles
protected String additionalFolders
protected String additionalGoals
protected String mavenpath
protected String outputDirectory
Constructor Detail |
---|
public GenerateNetbeansProjectMojo()
Method Detail |
---|
public void setOutputDirectory(String outputDirectory)
outputDirectory
- The new outputDirectory.public void setAdditionalFiles(String additionalFiles)
additionalFiles
- The new additionalFiles.public void setAdditionalFolders(String additionalFolders)
additionalFolders
- The new additionalFolders.public void setAdditionalGoals(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(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 File createNetbeansProjectDirectory() throws FreeformPluginException
FreeformPluginException
- if something goes wrong.protected void writeMavencallFile(File netbeansProjectDirectory, boolean useOutputDirectory, 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(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(File netbeansProjectDirectory, String repositoryBasedir) throws FreeformPluginException
repositoryBasedir
- Not used.netbeansProjectDirectory
- The directory to write the mavencall.xml
file.
FreeformPluginException
- if something goes wrong.protected void writeIdeFileTargetsFile(File netbeansProjectDirectory, FreeformProject freeformProject) throws FreeformPluginException
netbeansProjectDirectory
- The directory to write the ide-file-targets.xml
file.freeformProject
- The FreeformProject to write in the file.
FreeformPluginException
- if something goes wrong.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |