@Mojo(name="check",
defaultPhase=VERIFY,
threadSafe=true)
@Execute(goal="pmd")
public class PmdViolationCheckMojo
extends AbstractPmdViolationCheckMojo<Violation>
aggregate, failOnViolation, project| Constructor and Description |
|---|
PmdViolationCheckMojo()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
protected List<Violation> |
getErrorDetails(File pmdFile)
Gets the attributes and text for the violation tag and puts them in a HashMap
|
protected int |
getPriority(Violation errorDetail) |
protected ViolationDetails<Violation> |
newViolationDetailsInstance() |
protected void |
printError(Violation item,
String severity)
Formats the failure details and prints them as an INFO message
|
executeCheck, getMaxAllowedViolations, isAggregator, isFailOnViolation, printErrorspublic PmdViolationCheckMojo()
ExcludeViolationsFromFile.public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected void printError(Violation item, String severity)
printError in class AbstractPmdViolationCheckMojo<Violation>item - either a Violation from PMD
or a Duplication from CPDseverity - the found issue is prefixed with the given severity, usually "Warning" or "Failure".protected List<Violation> getErrorDetails(File pmdFile) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException
AbstractPmdViolationCheckMojogetErrorDetails in class AbstractPmdViolationCheckMojo<Violation>pmdFile - the xml output from PMD or CPDViolations
or CPD Duplications.org.codehaus.plexus.util.xml.pull.XmlPullParserException - if the analysis file contains invalid XMLIOException - if the analysis file could be readprotected int getPriority(Violation errorDetail)
getPriority in class AbstractPmdViolationCheckMojo<Violation>protected ViolationDetails<Violation> newViolationDetailsInstance()
newViolationDetailsInstance in class AbstractPmdViolationCheckMojo<Violation>Copyright © 2005–2023 The Apache Software Foundation. All rights reserved.