hudson.plugins.analysis.core
Class HealthAwareMavenReporter

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

Deprecated. use HealthAwareReporter

@Deprecated
public abstract class HealthAwareMavenReporter
extends hudson.maven.MavenReporter
implements HealthDescriptor

A base class for maven reporters with the following two characteristics:

Author:
Ulli Hafner
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
HealthAwareMavenReporter(String threshold, String newThreshold, String failureThreshold, String newFailureThreshold, String healthy, String unHealthy, String thresholdLimit, boolean canRunOnFailed, String pluginName)
          Deprecated. replaced by HealthAwareMavenReporter(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, boolean, String)
HealthAwareMavenReporter(String threshold, String newThreshold, String failureThreshold, String newFailureThreshold, String healthy, String unHealthy, String thresholdLimit, String pluginName)
          Deprecated. replaced by HealthAwareMavenReporter(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, boolean, String)
HealthAwareMavenReporter(String healthy, String unHealthy, String thresholdLimit, String unstableTotalAll, String unstableTotalHigh, String unstableTotalNormal, String unstableTotalLow, String unstableNewAll, String unstableNewHigh, String unstableNewNormal, String unstableNewLow, String failedTotalAll, String failedTotalHigh, String failedTotalNormal, String failedTotalLow, String failedNewAll, String failedNewHigh, String failedNewNormal, String failedNewLow, boolean canRunOnFailed, String pluginName)
          Deprecated. Creates a new instance of HealthReportingMavenReporter.
 
Method Summary
protected abstract  boolean acceptGoal(String goal)
          Deprecated. Determines whether this plug-in will accept the specified goal.
protected  boolean canContinue(hudson.model.Result result)
          Deprecated. Returns whether this reporter can continue processing.
 boolean getCanRunOnFailed()
          Deprecated. Returns whether this plug-in can run for failed builds, too.
protected  String getDefaultEncoding()
          Deprecated. Returns the default encoding derived from the maven pom file.
 String getFailureThreshold()
          Deprecated. Returns the annotation threshold to be reached if a build should be considered as failure.
 String getHealthy()
          Deprecated. Returns the healthy threshold, i.e.
 Priority getMinimumPriority()
          Deprecated. Returns the minimum priority that should be considered when computing build health.
protected  String getModuleName(org.apache.maven.project.MavenProject pom)
          Deprecated. Returns the name of the module.
 String getNewFailureThreshold()
          Deprecated. Returns the threshold of new annotations to be reached if a build should be considered as failure.
 String getNewThreshold()
          Deprecated. Returns the threshold for new annotations to be reached if a build should be considered as unstable.
protected abstract  Class<? extends hudson.model.Action> getResultActionClass()
          Deprecated. Returns the type of the result action.
protected  hudson.FilePath getTargetPath(org.apache.maven.project.MavenProject pom)
          Deprecated. Returns the path to the target folder.
 String getThreshold()
          Deprecated. Returns the threshold of all annotations to be reached if a build should be considered as unstable.
 String getThresholdLimit()
          Deprecated. Returns the threshold limit.
 Thresholds getThresholds()
          Deprecated. Returns the threshold of all annotations to be reached if a build should be considered as unstable or failed, resp.
 String getUnHealthy()
          Deprecated. Returns the unhealthy threshold, i.e.
protected abstract  ParserResult perform(hudson.maven.MavenBuildProxy build, org.apache.maven.project.MavenProject pom, hudson.maven.MojoInfo mojo, PluginLogger logger)
          Deprecated. Performs the publishing of the results of this plug-in.
protected abstract  BuildResult persistResult(ParserResult project, hudson.maven.MavenBuild build)
          Deprecated. Persists the result in the build (on the master).
 boolean postExecute(hudson.maven.MavenBuildProxy build, org.apache.maven.project.MavenProject pom, hudson.maven.MojoInfo mojo, hudson.model.BuildListener listener, Throwable error)
          Deprecated. 
 
Methods inherited from class hudson.maven.MavenReporter
end, enterModule, getAggregatedProjectAction, getDescriptor, getProjectAction, getProjectActions, 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

HealthAwareMavenReporter

public HealthAwareMavenReporter(String healthy,
                                String unHealthy,
                                String thresholdLimit,
                                String unstableTotalAll,
                                String unstableTotalHigh,
                                String unstableTotalNormal,
                                String unstableTotalLow,
                                String unstableNewAll,
                                String unstableNewHigh,
                                String unstableNewNormal,
                                String unstableNewLow,
                                String failedTotalAll,
                                String failedTotalHigh,
                                String failedTotalNormal,
                                String failedTotalLow,
                                String failedNewAll,
                                String failedNewHigh,
                                String failedNewNormal,
                                String failedNewLow,
                                boolean canRunOnFailed,
                                String pluginName)
Deprecated. 
Creates a new instance of HealthReportingMavenReporter.

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
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
pluginName - the name of the plug-in

HealthAwareMavenReporter

@Deprecated
public HealthAwareMavenReporter(String threshold,
                                           String newThreshold,
                                           String failureThreshold,
                                           String newFailureThreshold,
                                           String healthy,
                                           String unHealthy,
                                           String thresholdLimit,
                                           boolean canRunOnFailed,
                                           String pluginName)
Deprecated. replaced by HealthAwareMavenReporter(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, boolean, String)

Creates a new instance of HealthReportingMavenReporter.

Parameters:
threshold - Annotations threshold to be reached if a build should be considered as unstable.
newThreshold - New annotations threshold to be reached if a build should be considered as unstable.
failureThreshold - Annotation threshold to be reached if a build should be considered as failure.
newFailureThreshold - New annotations threshold to be reached if a build should be considered as failure.
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
canRunOnFailed - determines whether the plug-in can run for failed builds, too
pluginName - the name of the plug-in

HealthAwareMavenReporter

@Deprecated
public HealthAwareMavenReporter(String threshold,
                                           String newThreshold,
                                           String failureThreshold,
                                           String newFailureThreshold,
                                           String healthy,
                                           String unHealthy,
                                           String thresholdLimit,
                                           String pluginName)
Deprecated. replaced by HealthAwareMavenReporter(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, boolean, String)

Creates a new instance of HealthReportingMavenReporter.

Parameters:
threshold - Annotations threshold to be reached if a build should be considered as unstable.
newThreshold - New annotations threshold to be reached if a build should be considered as unstable.
failureThreshold - Annotation threshold to be reached if a build should be considered as failure.
newFailureThreshold - New annotations threshold to be reached if a build should be considered as failure.
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
pluginName - the name of the plug-in
Method Detail

getThresholds

public Thresholds getThresholds()
Deprecated. 
Returns the threshold of all annotations to be reached if a build should be considered as unstable or failed, resp.

Specified by:
getThresholds in interface HealthDescriptor
Returns:
the threshold

postExecute

public final boolean postExecute(hudson.maven.MavenBuildProxy build,
                                 org.apache.maven.project.MavenProject pom,
                                 hudson.maven.MojoInfo mojo,
                                 hudson.model.BuildListener listener,
                                 Throwable error)
                          throws InterruptedException,
                                 IOException
Deprecated. 

Overrides:
postExecute in class hudson.maven.MavenReporter
Throws:
InterruptedException
IOException

getCanRunOnFailed

public boolean getCanRunOnFailed()
Deprecated. 
Returns whether this plug-in can run for failed builds, too.

Returns:
the can run on failed

canContinue

protected boolean canContinue(hudson.model.Result result)
Deprecated. 
Returns whether this reporter can continue processing. This default implementation returns true if the property canRunOnFailed is set or if the build is not aborted or failed.

Parameters:
result - build result
Returns:
true if the build can continue

acceptGoal

protected abstract boolean acceptGoal(String goal)
Deprecated. 
Determines whether this plug-in will accept the specified goal. The postExecute(MavenBuildProxy, MavenProject, MojoInfo, BuildListener, Throwable) will only by invoked if the plug-in returns true.

Parameters:
goal - the maven goal
Returns:
true if the plug-in accepts this goal

perform

protected abstract ParserResult perform(hudson.maven.MavenBuildProxy build,
                                        org.apache.maven.project.MavenProject pom,
                                        hudson.maven.MojoInfo mojo,
                                        PluginLogger logger)
                                 throws InterruptedException,
                                        IOException
Deprecated. 
Performs the publishing of the results of this plug-in.

Parameters:
build - the build proxy (on the slave)
pom - the pom of the module
mojo - the executed mojo
logger - the logger to report the progress to
Returns:
the java project containing the found annotations
Throws:
InterruptedException - If the build is interrupted by the user (in an attempt to abort the build.) Normally the BuildStep implementations may simply forward the exception it got from its lower-level functions.
IOException - If the implementation wants to abort the processing when an IOException happens, it can simply propagate the exception to the caller. This will cause the build to fail, with the default error message. Implementations are encouraged to catch IOException on its own to provide a better error message, if it can do so, so that users have better understanding on why it failed.

persistResult

protected abstract BuildResult persistResult(ParserResult project,
                                             hudson.maven.MavenBuild build)
Deprecated. 
Persists the result in the build (on the master).

Parameters:
project - the created project
build - the build (on the master)
Returns:
the created result

getDefaultEncoding

protected String getDefaultEncoding()
Deprecated. 
Returns the default encoding derived from the maven pom file.

Returns:
the default encoding

getResultActionClass

protected abstract Class<? extends hudson.model.Action> getResultActionClass()
Deprecated. 
Returns the type of the result action.

Returns:
the type of the result action

getTargetPath

protected hudson.FilePath getTargetPath(org.apache.maven.project.MavenProject pom)
Deprecated. 
Returns the path to the target folder.

Parameters:
pom - the maven pom
Returns:
the path to the target folder

getThreshold

public String getThreshold()
Deprecated. 
Returns the threshold of all annotations to be reached if a build should be considered as unstable.

Returns:
the threshold of all annotations to be reached if a build should be considered as unstable.

getNewThreshold

public String getNewThreshold()
Deprecated. 
Returns the threshold for new annotations to be reached if a build should be considered as unstable.

Returns:
the threshold for new annotations to be reached if a build should be considered as unstable.

getFailureThreshold

public String getFailureThreshold()
Deprecated. 
Returns the annotation threshold to be reached if a build should be considered as failure.

Returns:
the annotation threshold to be reached if a build should be considered as failure.

getNewFailureThreshold

public String getNewFailureThreshold()
Deprecated. 
Returns the threshold of new annotations to be reached if a build should be considered as failure.

Returns:
the threshold of new annotations to be reached if a build should be considered as failure.

getHealthy

public String getHealthy()
Deprecated. 
Returns the healthy threshold, i.e. when health is reported as 100%.

Specified by:
getHealthy in interface HealthDescriptor
Returns:
the 100% healthiness

getUnHealthy

public String getUnHealthy()
Deprecated. 
Returns the unhealthy threshold, i.e. when health is reported as 0%.

Specified by:
getUnHealthy in interface HealthDescriptor
Returns:
the 0% unhealthiness

getMinimumPriority

public Priority getMinimumPriority()
Deprecated. 
Returns the minimum priority that should be considered when computing build health. E.g., if Priority.NORMAL is returned, then annotations with priority Priority.LOW are ignored.

Specified by:
getMinimumPriority in interface HealthDescriptor
Returns:
the minimum priority to consider

getThresholdLimit

public String getThresholdLimit()
Deprecated. 
Returns the threshold limit.

Returns:
the threshold limit

getModuleName

protected String getModuleName(org.apache.maven.project.MavenProject pom)
Deprecated. 
Returns the name of the module.

Parameters:
pom - the pom
Returns:
the name of the module


Copyright © 2004-2012 Hudson. All Rights Reserved.