@Mojo(name="cpd-check", defaultPhase=VERIFY, threadSafe=true) @Execute(goal="cpd") public class CpdViolationCheckMojo extends AbstractPmdViolationCheckMojo<Duplication>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
failOnViolation
Whether to fail the build if the validation check fails.
|
aggregate, project| Constructor and Description |
|---|
CpdViolationCheckMojo()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
protected List<Duplication> |
getErrorDetails(File cpdFile)
Gets the attributes and text for the violation tag and puts them in a HashMap
|
protected int |
getPriority(Duplication errorDetail) |
boolean |
isFailOnViolation() |
protected ViolationDetails<Duplication> |
newViolationDetailsInstance() |
protected void |
printError(Duplication item,
String severity)
Formats the failure details and prints them as an INFO message
|
executeCheck, printErrorsgetLog, getPluginContext, setLog, setPluginContext@Parameter(property="cpd.failOnViolation", defaultValue="true", required=true) protected boolean failOnViolation
public CpdViolationCheckMojo()
ExcludeDuplicationsFromFile.public void execute()
throws MojoExecutionException,
MojoFailureException
protected void printError(Duplication item, String severity)
printError in class AbstractPmdViolationCheckMojo<Duplication>protected List<Duplication> getErrorDetails(File cpdFile) throws XmlPullParserException, IOException
getErrorDetails in class AbstractPmdViolationCheckMojo<Duplication>XmlPullParserExceptionIOExceptionprotected int getPriority(Duplication errorDetail)
getPriority in class AbstractPmdViolationCheckMojo<Duplication>protected ViolationDetails<Duplication> newViolationDetailsInstance()
newViolationDetailsInstance in class AbstractPmdViolationCheckMojo<Duplication>public boolean isFailOnViolation()
isFailOnViolation in class AbstractPmdViolationCheckMojo<Duplication>Copyright © 2005–2016 The Apache Software Foundation. All rights reserved.