org.codehaus.mojo.javascript
Class AbstractJavascriptReport

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.reporting.AbstractMavenReport
          extended by org.codehaus.mojo.javascript.AbstractJavascriptReport
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenReport
Direct Known Subclasses:
JsDocReport, JsLintReport

public abstract class AbstractJavascriptReport
extends org.apache.maven.reporting.AbstractMavenReport

Abstract report for running Javascript-based report tools

Author:
nicolas De Loof
Is bound to the specified phase of the standard build lifecycle:
site

Field Summary
protected  java.io.File outputDirectory
          The output directory of the jsdoc report.
 
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
AbstractJavascriptReport()
           
 
Method Summary
protected  void copyScripts(java.io.File source, java.io.File dest)
           
protected  java.lang.Object evalScript(java.io.File[] scripts, java.lang.String[] args, java.util.Map context)
           
protected  java.lang.Object evalScript(java.io.File[] scripts, java.lang.String cmd, java.lang.String[] args, java.util.Map context)
           
protected  java.lang.Object evalScript(java.io.File script, java.lang.String[] args, java.util.Map context)
           
protected  java.lang.Object evalScript(java.io.File script, java.lang.String cmd, java.lang.String[] args, java.util.Map context)
           
protected  java.lang.Object evalScript(java.lang.String script, java.lang.String[] args, java.util.Map context)
           
 java.util.ResourceBundle getBundle(java.util.Locale locale)
           
 java.lang.String getDescription(java.util.Locale locale)
          
protected  int getLanguageVersion()
           
protected abstract  java.lang.String getName()
           
 java.lang.String getName(java.util.Locale locale)
          
protected  java.lang.String getOutputDirectory()
          
 java.lang.String getOutputName()
          
protected  org.apache.maven.project.MavenProject getProject()
          
protected  java.lang.String[] getScripts(java.io.File sourceDirectory)
           
protected  org.codehaus.doxia.site.renderer.SiteRenderer getSiteRenderer()
          
 java.io.File getWorkDirectory()
           
protected  void unpackJavascriptDependency(java.lang.String artifact, java.io.File dest)
          Unpack a javascript dependency
 
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
canGenerateReport, closeReport, execute, executeReport, generate, getCategoryName, getReportOutputDirectory, getSink, 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
 

Field Detail

outputDirectory

protected java.io.File outputDirectory
The output directory of the jsdoc report.

Is defined by:
expression:
${project.reporting.outputDirectory}
Is readonly.
Is required.
Constructor Detail

AbstractJavascriptReport

public AbstractJavascriptReport()
Method Detail

getOutputDirectory

protected java.lang.String getOutputDirectory()

Specified by:
getOutputDirectory in class org.apache.maven.reporting.AbstractMavenReport
See Also:
AbstractMavenReport.getOutputDirectory()

getSiteRenderer

protected org.codehaus.doxia.site.renderer.SiteRenderer getSiteRenderer()

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

getProject

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

Specified by:
getProject in class org.apache.maven.reporting.AbstractMavenReport
See Also:
AbstractMavenReport.getProject()

unpackJavascriptDependency

protected void unpackJavascriptDependency(java.lang.String artifact,
                                          java.io.File dest)
                                   throws org.apache.maven.reporting.MavenReportException
Unpack a javascript dependency

Throws:
org.apache.maven.reporting.MavenReportException

getScripts

protected java.lang.String[] getScripts(java.io.File sourceDirectory)

evalScript

protected java.lang.Object evalScript(java.lang.String script,
                                      java.lang.String[] args,
                                      java.util.Map context)
                               throws org.apache.maven.reporting.MavenReportException
Parameters:
script - script to execute
args - script arguments
context - Map of arguments to pass to the script
Throws:
java.io.IOException - failure...
org.apache.maven.reporting.MavenReportException

evalScript

protected java.lang.Object evalScript(java.io.File script,
                                      java.lang.String cmd,
                                      java.lang.String[] args,
                                      java.util.Map context)
                               throws org.apache.maven.reporting.MavenReportException
Throws:
org.apache.maven.reporting.MavenReportException

evalScript

protected java.lang.Object evalScript(java.io.File script,
                                      java.lang.String[] args,
                                      java.util.Map context)
                               throws org.apache.maven.reporting.MavenReportException
Throws:
org.apache.maven.reporting.MavenReportException

evalScript

protected java.lang.Object evalScript(java.io.File[] scripts,
                                      java.lang.String[] args,
                                      java.util.Map context)
                               throws org.apache.maven.reporting.MavenReportException
Throws:
org.apache.maven.reporting.MavenReportException

evalScript

protected java.lang.Object evalScript(java.io.File[] scripts,
                                      java.lang.String cmd,
                                      java.lang.String[] args,
                                      java.util.Map context)
                               throws org.apache.maven.reporting.MavenReportException
Parameters:
script - script to execute
args - script arguments
context - Map of arguments to pass to the script
Throws:
java.io.IOException - failure...
org.apache.maven.reporting.MavenReportException

copyScripts

protected void copyScripts(java.io.File source,
                           java.io.File dest)
                    throws java.io.IOException
Throws:
java.io.IOException

getName

protected abstract java.lang.String getName()

getBundle

public java.util.ResourceBundle getBundle(java.util.Locale locale)

getDescription

public java.lang.String getDescription(java.util.Locale locale)

See Also:
MavenReport.getDescription(java.util.Locale)

getName

public java.lang.String getName(java.util.Locale locale)

See Also:
MavenReport.getName(java.util.Locale)

getOutputName

public java.lang.String getOutputName()

See Also:
MavenReport.getOutputName()

getWorkDirectory

public java.io.File getWorkDirectory()
Returns:
the workDirectory

getLanguageVersion

protected int getLanguageVersion()
Returns:


Copyright © 2011 SOFTEC sa. All Rights Reserved.