|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.maven.MavenReporter
hudson.plugins.warnings.util.HealthAwareMavenReporter
public abstract class HealthAwareMavenReporter
A base class for maven reporters with the following two characteristics:
UNSTABLE.
HealthReportBuilder to compute the health and the health trend graph.
| Constructor Summary | |
|---|---|
HealthAwareMavenReporter(java.lang.String threshold,
java.lang.String healthy,
java.lang.String unHealthy,
java.lang.String height,
java.lang.String thresholdLimit,
java.lang.String pluginName)
Creates a new instance of HealthReportingMavenReporter. |
|
| Method Summary | |
|---|---|
protected abstract boolean |
acceptGoal(java.lang.String goal)
Determines whether this plug-in will accept the specified goal. |
protected java.lang.String |
getDefaultEncoding()
Returns the default encoding derived from the maven pom file. |
java.lang.String |
getHealthy()
Returns the healthy threshold, i.e. when health is reported as 100%. |
int |
getHealthyAnnotations()
Returns the healthy threshold for annotations, i.e. when health is reported as 100%. |
java.lang.String |
getHeight()
Returns the height of the trend graph. |
int |
getMinimumAnnotations()
Returns the threshold to be reached if a build should be considered as unstable. |
Priority |
getMinimumPriority()
Returns the minimum priority that should be considered when computing build health and stability. |
protected abstract java.lang.Class<? extends hudson.model.Action> |
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. |
java.lang.String |
getThreshold()
Returns the annotation threshold to be reached if a build should be considered as unstable. |
java.lang.String |
getThresholdLimit()
Returns the thresholdLimit. |
int |
getTrendHeight()
Returns the height of the trend graph. |
java.lang.String |
getUnHealthy()
Returns the unhealthy threshold, i.e. when health is reported as 0%. |
int |
getUnHealthyAnnotations()
Returns the unhealthy threshold of annotations, i.e. when health is reported as 0%. |
boolean |
isHealthyReportEnabled()
Determines whether a health report should be created. |
boolean |
isThresholdEnabled()
Determines whether a threshold has been defined. |
protected void |
log(java.io.PrintStream logger,
java.lang.String message)
Logs the specified message. |
protected abstract ParserResult |
perform(hudson.maven.MavenBuildProxy build,
org.apache.maven.project.MavenProject pom,
hudson.maven.MojoInfo mojo,
java.io.PrintStream logger)
Performs the publishing of the results of this plug-in. |
protected abstract void |
persistResult(ParserResult project,
hudson.maven.MavenBuild build)
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,
java.lang.Throwable error)
|
| Methods inherited from class hudson.maven.MavenReporter |
|---|
end, enterModule, getAggregatedProjectAction, getDescriptor, 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 |
|---|
public HealthAwareMavenReporter(java.lang.String threshold,
java.lang.String healthy,
java.lang.String unHealthy,
java.lang.String height,
java.lang.String thresholdLimit,
java.lang.String pluginName)
HealthReportingMavenReporter.
threshold - Bug threshold to be reached if a build should be considered as
unstable.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 valueheight - the height of the trend graphthresholdLimit - determines which warning priorities should be considered when
evaluating the build stability and healthpluginName - the name of the plug-in| Method Detail |
|---|
public final boolean postExecute(hudson.maven.MavenBuildProxy build,
org.apache.maven.project.MavenProject pom,
hudson.maven.MojoInfo mojo,
hudson.model.BuildListener listener,
java.lang.Throwable error)
throws java.lang.InterruptedException,
java.io.IOException
postExecute in class hudson.maven.MavenReporterjava.lang.InterruptedException
java.io.IOExceptionprotected abstract boolean acceptGoal(java.lang.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,
java.io.PrintStream logger)
throws java.lang.InterruptedException,
java.io.IOException
build - the build proxy (on the slave)pom - the pom of the modulemojo - the executed mojologger - the logger to report the progress to
java.lang.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.
java.io.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 void persistResult(ParserResult project,
hudson.maven.MavenBuild build)
project - the created projectbuild - the build (on the master)
protected void log(java.io.PrintStream logger,
java.lang.String message)
logger - the loggermessage - the messageprotected java.lang.String getDefaultEncoding()
protected abstract java.lang.Class<? extends hudson.model.Action> getResultActionClass()
protected hudson.FilePath getTargetPath(org.apache.maven.project.MavenProject pom)
pom - the maven pom
public boolean isThresholdEnabled()
isThresholdEnabled in interface HealthDescriptortrue if a threshold has been definedpublic java.lang.String getThreshold()
public int getMinimumAnnotations()
getMinimumAnnotations in interface HealthDescriptorpublic boolean isHealthyReportEnabled()
isHealthyReportEnabled in interface HealthDescriptortrue if a health report should be createdpublic java.lang.String getHealthy()
public int getHealthyAnnotations()
getHealthyAnnotations in interface HealthDescriptorpublic java.lang.String getUnHealthy()
public int getUnHealthyAnnotations()
getUnHealthyAnnotations in interface HealthDescriptorpublic java.lang.String getHeight()
public int getTrendHeight()
public Priority getMinimumPriority()
Priority.NORMAL is
returned, then annotations with priority Priority.LOW are
ignored.
getMinimumPriority in interface HealthDescriptorpublic java.lang.String getThresholdLimit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||