eu.lindenbaum.maven
Class EDocReport

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.reporting.AbstractMavenReport
          extended by eu.lindenbaum.maven.EDocReport
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenMultiPageReport, org.apache.maven.reporting.MavenReport

public final class EDocReport
extends org.apache.maven.reporting.AbstractMavenReport

This Mojo will generate EDoc documentation for the sources found in AbstractErlangReport.srcMainErlang.

The output will be put into AbstractErlangReport.targetSite/doc. The user may specify custom EDoc options in the project pom using the eDocOptions parameter.

BUG It is known that edoc does not generate a charset meta tag for the resulting html output.

BUG It is known that doxia overwrites the reports index.html with a broken template when the report is invoked as standalone.

Author:
Tobias Schlager

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
EDocReport()
           
 
Method Summary
 boolean canGenerateReport()
           
protected  void executeReport(Locale locale)
           
protected  void generateAppEDoc(String app, File srcDir, File outDir, String[] options)
          Generate the documentation with edoc for an OTP application.
protected  void generateEDoc(File srcDir, File outDir, String[] options)
          Generate the documentation with edoc for a set of files.
 String getDescription(Locale locale)
           
 String getName(Locale locale)
           
protected  String getOutputDirectory()
           
 String getOutputName()
           
protected  org.apache.maven.project.MavenProject getProject()
           
protected  org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
           
 boolean isExternalReport()
           
 
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, execute, generate, generate, generate, getCategoryName, getReportOutputDirectory, getSink, getSinkFactory, 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

EDocReport

public EDocReport()
Method Detail

executeReport

protected void executeReport(Locale locale)
                      throws org.apache.maven.reporting.MavenReportException
Specified by:
executeReport in class org.apache.maven.reporting.AbstractMavenReport
Throws:
org.apache.maven.reporting.MavenReportException

canGenerateReport

public boolean canGenerateReport()
Specified by:
canGenerateReport in interface org.apache.maven.reporting.MavenReport
Overrides:
canGenerateReport in class org.apache.maven.reporting.AbstractMavenReport

getOutputDirectory

protected String getOutputDirectory()
Specified by:
getOutputDirectory in class org.apache.maven.reporting.AbstractMavenReport

getDescription

public String getDescription(Locale locale)

getName

public String getName(Locale locale)

getOutputName

public String getOutputName()

generateEDoc

protected void generateEDoc(File srcDir,
                            File outDir,
                            String[] options)
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
Generate the documentation with edoc for a set of files.

Parameters:
srcDir - directory where sources reside
outDir - directory to put edoc in
options - optional edoc parameters, maybe null
Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException

generateAppEDoc

protected void generateAppEDoc(String app,
                               File srcDir,
                               File outDir,
                               String[] options)
                        throws org.apache.maven.plugin.MojoExecutionException,
                               org.apache.maven.plugin.MojoFailureException
Generate the documentation with edoc for an OTP application.

Parameters:
app - application name
srcDir - directory where sources and .app file reside
outDir - directory to put edoc in
options - optional edoc parameters, maybe null
Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException

getProject

protected org.apache.maven.project.MavenProject getProject()
Specified by:
getProject in class org.apache.maven.reporting.AbstractMavenReport

getSiteRenderer

protected org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
Specified by:
getSiteRenderer in class org.apache.maven.reporting.AbstractMavenReport

isExternalReport

public boolean isExternalReport()
Specified by:
isExternalReport in interface org.apache.maven.reporting.MavenReport
Overrides:
isExternalReport in class org.apache.maven.reporting.AbstractMavenReport


Copyright © 2010 Lindenbaum GmbH. All Rights Reserved.