|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.maven.MavenReporter
hudson.plugins.analysis.core.HealthAwareReporter<T>
T - the actual type of the build resultpublic abstract class HealthAwareReporter<T extends BuildResult>
A base class for Maven reporters with the following two characteristics:
UNSTABLE.
HealthReportBuilder to compute the health and the health trend graph.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Constructor Summary | |
|---|---|
HealthAwareReporter(String healthy,
String unHealthy,
String thresholdLimit,
boolean useDeltaValues,
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,
boolean canComputeNew,
String pluginName)
Creates a new instance of HealthReportingMavenReporter. |
|
HealthAwareReporter(String healthy,
String unHealthy,
String thresholdLimit,
boolean useDeltaValues,
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. |
|
| Method Summary | |
|---|---|
protected abstract boolean |
acceptGoal(String goal)
Determines whether this plug-in will accept the specified goal. |
boolean |
canComputeNew()
Returns whether new warnings should be computed (with respect to baseline). |
protected boolean |
canContinue(hudson.model.Result result)
Returns whether this reporter can continue processing. |
protected abstract hudson.maven.MavenAggregatedReport |
createMavenAggregatedReport(hudson.maven.MavenBuild build,
T result)
Creates a new BuildResult instance. |
protected abstract T |
createResult(hudson.maven.MavenBuild build,
ParserResult project)
Creates a new BuildResult instance. |
boolean |
end(hudson.maven.MavenBuild build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Since aggregation is done in background we still need to log all messages of that step to the log. |
boolean |
getCanComputeNew()
Returns whether new warnings should be computed (with respect to baseline). |
boolean |
getCanRunOnFailed()
Returns whether this plug-in can run for failed builds, too. |
protected String |
getDefaultEncoding()
Returns the default encoding derived from the maven pom file. |
ReporterDescriptor |
getDescriptor()
|
String |
getHealthy()
Returns the healthy threshold, i.e. |
Priority |
getMinimumPriority()
Returns the minimum priority that should be considered when computing build health. |
protected String |
getModuleName(org.apache.maven.project.MavenProject pom)
Returns the name of the module. |
protected abstract Class<? extends MavenResultAction<T>> |
getResultActionClass()
Returns the type of the result action. |
protected hudson.FilePath |
getTargetPath(org.apache.maven.project.MavenProject pom)
Returns the path to the target folder. |
String |
getThresholdLimit()
Returns the threshold limit. |
Thresholds |
getThresholds()
Returns the threshold of all annotations to be reached if a build should be considered as unstable or failed, resp. |
String |
getUnHealthy()
Returns the unhealthy threshold, i.e. |
boolean |
getUseDeltaValues()
Returns whether absolute annotations delta or the actual annotations set difference should be used to evaluate the build stability. |
protected abstract ParserResult |
perform(hudson.maven.MavenBuildProxy build,
org.apache.maven.project.MavenProject pom,
hudson.maven.MojoInfo mojo,
PluginLogger logger)
Performs the publishing of the results of this plug-in. |
boolean |
postExecute(hudson.maven.MavenBuildProxy build,
org.apache.maven.project.MavenProject pom,
hudson.maven.MojoInfo mojo,
hudson.model.BuildListener listener,
Throwable error)
|
| Methods inherited from class hudson.maven.MavenReporter |
|---|
enterModule, getAggregatedProjectAction, 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 |
|---|
public HealthAwareReporter(String healthy,
String unHealthy,
String thresholdLimit,
boolean useDeltaValues,
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,
boolean canComputeNew,
String pluginName)
HealthReportingMavenReporter.
healthy - Report health as 100% when the number of warnings is less than
this valueunHealthy - Report health as 0% when the number of warnings is greater
than this valuethresholdLimit - determines which warning priorities should be considered when
evaluating the build stability and healthuseDeltaValues - determines whether the absolute annotations delta or the
actual annotations set difference should be used to evaluate
the build stabilityunstableTotalAll - annotation thresholdunstableTotalHigh - annotation thresholdunstableTotalNormal - annotation thresholdunstableTotalLow - annotation thresholdunstableNewAll - annotation thresholdunstableNewHigh - annotation thresholdunstableNewNormal - annotation thresholdunstableNewLow - annotation thresholdfailedTotalAll - annotation thresholdfailedTotalHigh - annotation thresholdfailedTotalNormal - annotation thresholdfailedTotalLow - annotation thresholdfailedNewAll - annotation thresholdfailedNewHigh - annotation thresholdfailedNewNormal - annotation thresholdfailedNewLow - annotation thresholdcanRunOnFailed - determines whether the plug-in can run for failed builds, toocanComputeNew - determines whether new warnings should be computed (with respect to baseline)pluginName - the name of the plug-in
@Deprecated
public HealthAwareReporter(String healthy,
String unHealthy,
String thresholdLimit,
boolean useDeltaValues,
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)
| Method Detail |
|---|
public boolean getCanComputeNew()
true if new warnings should be computed (with
respect to baseline), false otherwisepublic boolean canComputeNew()
true if new warnings should be computed (with
respect to baseline), false otherwisepublic boolean getUseDeltaValues()
true if the annotation count should be used,
false if the actual (set) difference should be
computedpublic Thresholds getThresholds()
getThresholds in interface HealthDescriptor
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
postExecute in class hudson.maven.MavenReporterInterruptedException
IOExceptionpublic ReporterDescriptor getDescriptor()
getDescriptor in interface hudson.model.Describable<hudson.maven.MavenReporter>getDescriptor in class hudson.maven.MavenReporter
public boolean end(hudson.maven.MavenBuild build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
end in class hudson.maven.MavenReporterbuild - the finished maven module buildlauncher - the launcherlistener - the lister that holds the log
truepublic boolean getCanRunOnFailed()
true if this plug-in can run for failed builds,
false otherwiseprotected boolean canContinue(hudson.model.Result result)
true if the property
canRunOnFailed is set or if the build is not aborted or
failed.
result - build result
true if the build can continueprotected abstract boolean acceptGoal(String goal)
postExecute(MavenBuildProxy, MavenProject, MojoInfo,
BuildListener, Throwable) will only by invoked if the plug-in returns
true.
goal - the maven goal
true if the plug-in accepts this goal
protected abstract ParserResult perform(hudson.maven.MavenBuildProxy build,
org.apache.maven.project.MavenProject pom,
hudson.maven.MojoInfo mojo,
PluginLogger logger)
throws InterruptedException,
IOException
build - the build proxy (on the slave)pom - the pom of the modulemojo - the executed mojologger - the logger to report the progress to
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.
protected abstract T createResult(hudson.maven.MavenBuild build,
ParserResult project)
BuildResult instance.
build - the build (on the master)project - the created project
protected abstract hudson.maven.MavenAggregatedReport createMavenAggregatedReport(hudson.maven.MavenBuild build,
T result)
BuildResult instance.
build - the build (on the master)result - the build result
protected String getDefaultEncoding()
protected abstract Class<? extends MavenResultAction<T>> getResultActionClass()
protected hudson.FilePath getTargetPath(org.apache.maven.project.MavenProject pom)
pom - the maven pom
public String getHealthy()
getHealthy in interface HealthDescriptorpublic String getUnHealthy()
getUnHealthy in interface HealthDescriptorpublic Priority getMinimumPriority()
Priority.NORMAL is returned, then
annotations with priority Priority.LOW are ignored.
getMinimumPriority in interface HealthDescriptorpublic String getThresholdLimit()
protected String getModuleName(org.apache.maven.project.MavenProject pom)
pom - the pom
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||