@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() |
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) |
protected boolean |
isExcludedFromFailure(Duplication errorDetail) |
boolean |
isFailOnViolation() |
protected void |
loadExcludeFromFailuresData(String excludeFromFailureFile) |
protected ViolationDetails<Duplication> |
newViolationDetailsInstance() |
protected void |
printError(Duplication item,
String severity)
Formats the failure details and prints them as an INFO message
|
executeCheck, printErrors
getLog, getPluginContext, setLog, setPluginContext
@Parameter(property="cpd.failOnViolation", defaultValue="true", required=true) protected boolean failOnViolation
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 org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOException
getErrorDetails
in class AbstractPmdViolationCheckMojo<Duplication>
org.codehaus.plexus.util.xml.pull.XmlPullParserException
IOException
protected boolean isExcludedFromFailure(Duplication errorDetail)
isExcludedFromFailure
in class AbstractPmdViolationCheckMojo<Duplication>
protected void loadExcludeFromFailuresData(String excludeFromFailureFile) throws MojoExecutionException
loadExcludeFromFailuresData
in class AbstractPmdViolationCheckMojo<Duplication>
MojoExecutionException
protected 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–2015 The Apache Software Foundation. All rights reserved.