org.codehaus.mojo.javacc
Class JJDocMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.reporting.AbstractMavenReport
          extended by org.codehaus.mojo.javacc.JJDocMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenReport

public class JJDocMojo
extends org.apache.maven.reporting.AbstractMavenReport

JJDoc takes a JavaCC parser specification and produces documentation for the BNF grammar. This mojo will search the source directory for all *.jj files and run JJDoc once for each file it finds. Each of these output files, along with an index.html file will be placed in the site directory (target/site/jjdoc), and a link will be created in the "Project Reports" menu of the generated site.

Since:
2.3
Version:
$Id: JJDocMojo.java 6740 2008-04-11 14:45:58Z bentmann $
Author:
Paul Gier
See Also:
JJDoc Documentation

Field Summary
 
Fields inherited from interface org.apache.maven.reporting.MavenReport
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
JJDocMojo()
           
 
Method Summary
 boolean canGenerateReport()
           
 void executeReport(Locale locale)
          Run the actual report.
 String getDescription(Locale locale)
           
 String getName(Locale locale)
           
protected  String getOutputDirectory()
          Get the output directory of the report if run directly from the command line.
 String getOutputName()
           
protected  org.apache.maven.project.MavenProject getProject()
          Get the maven project.
protected  org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
          Get the site renderer.
 
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, execute, generate, generate, generate, getCategoryName, getReportOutputDirectory, getSink, getSinkFactory, isExternalReport, setReportOutputDirectory
 
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
 

Constructor Detail

JJDocMojo

public JJDocMojo()
Method Detail

getProject

protected org.apache.maven.project.MavenProject getProject()
Get the maven project.

Specified by:
getProject in class org.apache.maven.reporting.AbstractMavenReport
Returns:
The current Maven project.
See Also:
AbstractMavenReport.getProject()

getSiteRenderer

protected org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
Get the site renderer.

Specified by:
getSiteRenderer in class org.apache.maven.reporting.AbstractMavenReport
Returns:
The site renderer.
See Also:
AbstractMavenReport.getSiteRenderer()

getOutputDirectory

protected String getOutputDirectory()
Get the output directory of the report if run directly from the command line.

Specified by:
getOutputDirectory in class org.apache.maven.reporting.AbstractMavenReport
Returns:
The report output directory.
See Also:
AbstractMavenReport.getOutputDirectory()

getName

public String getName(Locale locale)
Parameters:
locale - The locale to use for this report.
Returns:
The name of this report.
See Also:
MavenReport.getName(java.util.Locale)

getDescription

public String getDescription(Locale locale)
Parameters:
locale - The locale to use for this report.
Returns:
The description of this report.
See Also:
MavenReport.getDescription(java.util.Locale)

getOutputName

public String getOutputName()
Returns:
The name of the main report file.
See Also:
MavenReport.getOutputName()

canGenerateReport

public boolean canGenerateReport()
Specified by:
canGenerateReport in interface org.apache.maven.reporting.MavenReport
Overrides:
canGenerateReport in class org.apache.maven.reporting.AbstractMavenReport
Returns:
true if the configured source directories are not empty, false otherwise.
See Also:
MavenReport.canGenerateReport()

executeReport

public void executeReport(Locale locale)
                   throws org.apache.maven.reporting.MavenReportException
Run the actual report.

Specified by:
executeReport in class org.apache.maven.reporting.AbstractMavenReport
Parameters:
locale - The locale to use for this report.
Throws:
org.apache.maven.reporting.MavenReportException - If the report generation failed.


Copyright © 2005-2011 Codehaus. All Rights Reserved.