|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.apache.maven.plugin.pmd.AbstractPmdViolationCheckMojo<D>
public abstract class AbstractPmdViolationCheckMojo<D>
Base class for mojos that check if there were any PMD violations.
| Field Summary | |
|---|---|
protected boolean |
aggregate
Whether to build an aggregated report at the root, or build individual reports. |
protected boolean |
failOnViolation
Whether to fail the build if the validation check fails. |
protected org.apache.maven.project.MavenProject |
project
The project to analyze. |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
AbstractPmdViolationCheckMojo()
|
|
| Method Summary | |
|---|---|
protected void |
executeCheck(String filename,
String tagName,
String key,
int failurePriority)
|
protected abstract List<D> |
getErrorDetails(File analisysFile)
Gets the attributes and text for the violation tag and puts them in a HashMap |
protected abstract int |
getPriority(D errorDetail)
|
protected abstract boolean |
isExcludedFromFailure(D errorDetail)
|
boolean |
isFailOnViolation()
|
protected abstract void |
loadExcludeFromFailuresData(String excludeFromFailureFile)
|
protected abstract ViolationDetails<D> |
newViolationDetailsInstance()
|
protected abstract void |
printError(D item,
String severity)
Formats the failure details and prints them as an INFO message |
protected void |
printErrors(List<D> failures,
List<D> warnings)
Prints the warnings and failures |
| 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 |
| Methods inherited from interface org.apache.maven.plugin.Mojo |
|---|
execute |
| Field Detail |
|---|
@Parameter(property="pmd.failOnViolation",
defaultValue="true",
required=true)
protected boolean failOnViolation
@Parameter(property="aggregate",
defaultValue="false")
protected boolean aggregate
@Component protected org.apache.maven.project.MavenProject project
| Constructor Detail |
|---|
public AbstractPmdViolationCheckMojo()
| Method Detail |
|---|
protected void executeCheck(String filename,
String tagName,
String key,
int failurePriority)
throws org.apache.maven.plugin.MojoFailureException,
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
protected abstract void loadExcludeFromFailuresData(String excludeFromFailureFile)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected abstract int getPriority(D errorDetail)
protected abstract boolean isExcludedFromFailure(D errorDetail)
protected abstract ViolationDetails<D> newViolationDetailsInstance()
protected void printErrors(List<D> failures,
List<D> warnings)
failures - list of failureswarnings - list of warnings
protected abstract void printError(D item,
String severity)
item -
protected abstract List<D> getErrorDetails(File analisysFile)
throws org.codehaus.plexus.util.xml.pull.XmlPullParserException,
IOException
analisysFile -
org.codehaus.plexus.util.xml.pull.XmlPullParserException
IOExceptionpublic boolean isFailOnViolation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||