hudson.plugins.pmd
Class PmdReporter

java.lang.Object
  extended by hudson.maven.MavenReporter
      extended by hudson.plugins.analysis.core.HealthAwareReporter<PmdResult>
          extended by hudson.plugins.pmd.PmdReporter
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.maven.MavenProjectActionBuilder, hudson.model.Describable<hudson.maven.MavenReporter>, hudson.plugins.analysis.core.HealthDescriptor, java.io.Serializable

public class PmdReporter
extends hudson.plugins.analysis.core.HealthAwareReporter<PmdResult>

Publishes the results of the PMD analysis (maven 2 project type).

Author:
Ulli Hafner
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
PmdReporter(java.lang.String healthy, java.lang.String unHealthy, java.lang.String thresholdLimit, boolean useDeltaValues, java.lang.String unstableTotalAll, java.lang.String unstableTotalHigh, java.lang.String unstableTotalNormal, java.lang.String unstableTotalLow, java.lang.String unstableNewAll, java.lang.String unstableNewHigh, java.lang.String unstableNewNormal, java.lang.String unstableNewLow, java.lang.String failedTotalAll, java.lang.String failedTotalHigh, java.lang.String failedTotalNormal, java.lang.String failedTotalLow, java.lang.String failedNewAll, java.lang.String failedNewHigh, java.lang.String failedNewNormal, java.lang.String failedNewLow, boolean canRunOnFailed, boolean canComputeNew)
          Creates a new instance of PmdReporter.
 
Method Summary
protected  boolean acceptGoal(java.lang.String goal)
           
protected  hudson.maven.MavenAggregatedReport createMavenAggregatedReport(hudson.maven.MavenBuild build, PmdResult result)
           
protected  PmdResult createResult(hudson.maven.MavenBuild build, hudson.plugins.analysis.core.ParserResult project)
           
 java.util.List<PmdProjectAction> getProjectActions(hudson.maven.MavenModule module)
           
protected  java.lang.Class<PmdMavenResultAction> getResultActionClass()
           
 hudson.plugins.analysis.core.ParserResult perform(hudson.maven.MavenBuildProxy build, org.apache.maven.project.MavenProject pom, hudson.maven.MojoInfo mojo, hudson.plugins.analysis.util.PluginLogger logger)
           
 
Methods inherited from class hudson.plugins.analysis.core.HealthAwareReporter
canComputeNew, canContinue, end, getCanComputeNew, getCanRunOnFailed, getDefaultEncoding, getDescriptor, getHealthy, getMinimumPriority, getModuleName, getTargetPath, getThresholdLimit, getThresholds, getUnHealthy, getUseDeltaValues, postExecute
 
Methods inherited from class hudson.maven.MavenReporter
enterModule, getAggregatedProjectAction, getProjectAction, leaveModule, postBuild, preBuild, preExecute, reportGenerated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PmdReporter

@DataBoundConstructor
public PmdReporter(java.lang.String healthy,
                                        java.lang.String unHealthy,
                                        java.lang.String thresholdLimit,
                                        boolean useDeltaValues,
                                        java.lang.String unstableTotalAll,
                                        java.lang.String unstableTotalHigh,
                                        java.lang.String unstableTotalNormal,
                                        java.lang.String unstableTotalLow,
                                        java.lang.String unstableNewAll,
                                        java.lang.String unstableNewHigh,
                                        java.lang.String unstableNewNormal,
                                        java.lang.String unstableNewLow,
                                        java.lang.String failedTotalAll,
                                        java.lang.String failedTotalHigh,
                                        java.lang.String failedTotalNormal,
                                        java.lang.String failedTotalLow,
                                        java.lang.String failedNewAll,
                                        java.lang.String failedNewHigh,
                                        java.lang.String failedNewNormal,
                                        java.lang.String failedNewLow,
                                        boolean canRunOnFailed,
                                        boolean canComputeNew)
Creates a new instance of PmdReporter.

Parameters:
healthy - Report health as 100% when the number of warnings is less than this value
unHealthy - Report health as 0% when the number of warnings is greater than this value
thresholdLimit - determines which warning priorities should be considered when evaluating the build stability and health
useDeltaValues - determines whether the absolute annotations delta or the actual annotations set difference should be used to evaluate the build stability
unstableTotalAll - annotation threshold
unstableTotalHigh - annotation threshold
unstableTotalNormal - annotation threshold
unstableTotalLow - annotation threshold
unstableNewAll - annotation threshold
unstableNewHigh - annotation threshold
unstableNewNormal - annotation threshold
unstableNewLow - annotation threshold
failedTotalAll - annotation threshold
failedTotalHigh - annotation threshold
failedTotalNormal - annotation threshold
failedTotalLow - annotation threshold
failedNewAll - annotation threshold
failedNewHigh - annotation threshold
failedNewNormal - annotation threshold
failedNewLow - annotation threshold
canRunOnFailed - determines whether the plug-in can run for failed builds, too
canComputeNew - determines whether new warnings should be computed (with respect to baseline)
Method Detail

acceptGoal

protected boolean acceptGoal(java.lang.String goal)
Specified by:
acceptGoal in class hudson.plugins.analysis.core.HealthAwareReporter<PmdResult>

perform

public hudson.plugins.analysis.core.ParserResult perform(hudson.maven.MavenBuildProxy build,
                                                         org.apache.maven.project.MavenProject pom,
                                                         hudson.maven.MojoInfo mojo,
                                                         hudson.plugins.analysis.util.PluginLogger logger)
                                                  throws java.lang.InterruptedException,
                                                         java.io.IOException
Specified by:
perform in class hudson.plugins.analysis.core.HealthAwareReporter<PmdResult>
Throws:
java.lang.InterruptedException
java.io.IOException

createResult

protected PmdResult createResult(hudson.maven.MavenBuild build,
                                 hudson.plugins.analysis.core.ParserResult project)
Specified by:
createResult in class hudson.plugins.analysis.core.HealthAwareReporter<PmdResult>

createMavenAggregatedReport

protected hudson.maven.MavenAggregatedReport createMavenAggregatedReport(hudson.maven.MavenBuild build,
                                                                         PmdResult result)
Specified by:
createMavenAggregatedReport in class hudson.plugins.analysis.core.HealthAwareReporter<PmdResult>

getProjectActions

public java.util.List<PmdProjectAction> getProjectActions(hudson.maven.MavenModule module)
Specified by:
getProjectActions in interface hudson.maven.MavenProjectActionBuilder
Overrides:
getProjectActions in class hudson.maven.MavenReporter

getResultActionClass

protected java.lang.Class<PmdMavenResultAction> getResultActionClass()
Specified by:
getResultActionClass in class hudson.plugins.analysis.core.HealthAwareReporter<PmdResult>


Copyright © 2004-2012. All Rights Reserved.