ro.isdc.wro.maven.plugin
Class AbstractLinterMojo<T>

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by ro.isdc.wro.maven.plugin.AbstractWro4jMojo
          extended by ro.isdc.wro.maven.plugin.AbstractSingleProcessorMojo
              extended by ro.isdc.wro.maven.plugin.AbstractLinterMojo<T>
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
CssLintMojo, JsHintMojo, JsLintMojo

public abstract class AbstractLinterMojo<T>
extends AbstractSingleProcessorMojo

Contains common behavior for mojos responsible for static code analysis, example: csslint, jslint, jshint.

Since:
1.6.3
Author:
Alex Objelean

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractLinterMojo()
           
 
Method Summary
protected  void addReport(ResourceLintReport<T> report)
          Add a single report to the registry of found errors.
protected abstract  ReportXmlFormatter createXmlFormatter(LintReport<T> lintReport, ReportXmlFormatter.FormatterType type)
           
protected abstract  File getReportFile()
           
protected abstract  String getReportFormat()
           
protected  void onAfterExecute()
          Invoked right after execution completion.
protected  void onBeforeExecute()
          Invoked before execution is performed.
 
Methods inherited from class ro.isdc.wro.maven.plugin.AbstractSingleProcessorMojo
createResourceProcessor, doExecute, getManagerFactory, getOptions
 
Methods inherited from class ro.isdc.wro.maven.plugin.AbstractWro4jMojo
execute, extendPluginClasspath, getTargetGroupsAsList, isIncrementalBuild, newWroManagerFactory, validate
 
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

AbstractLinterMojo

public AbstractLinterMojo()
Method Detail

addReport

protected final void addReport(ResourceLintReport<T> report)
Add a single report to the registry of found errors.

Parameters:
report - to add.

onBeforeExecute

protected void onBeforeExecute()
Invoked before execution is performed.

Overrides:
onBeforeExecute in class AbstractWro4jMojo

onAfterExecute

protected void onAfterExecute()
Invoked right after execution completion. This method is invoked also if the execution failed with an exception.

Overrides:
onAfterExecute in class AbstractWro4jMojo

createXmlFormatter

protected abstract ReportXmlFormatter createXmlFormatter(LintReport<T> lintReport,
                                                         ReportXmlFormatter.FormatterType type)

getReportFile

protected abstract File getReportFile()
Returns:
the file where the report should be written.

getReportFormat

protected abstract String getReportFormat()
Returns:
the preferred format of the report.


Copyright © 2008-2013. All Rights Reserved.