|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.maven.MavenReporter
hudson.plugins.checkstyle.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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Constructor Summary | |
|---|---|
HealthAwareMavenReporter(java.lang.String threshold,
java.lang.String newThreshold,
java.lang.String failureThreshold,
java.lang.String newFailureThreshold,
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 |
getFailureThreshold()
Returns the annotation threshold to be reached if a build should be considered as failure. |
java.lang.String |
getHealthy()
Returns the healthy threshold, i.e. |
java.lang.String |
getHeight()
Returns the height of the trend graph. |
Priority |
getMinimumPriority()
Returns the minimum priority that should be considered when computing build health and stability. |
java.lang.String |
getNewFailureThreshold()
Returns the threshold of new annotations to be reached if a build should be considered as failure. |
java.lang.String |
getNewThreshold()
Returns the threshold for new annotations to be reached if a build should be considered as unstable. |
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 threshold of all annotations to be reached if a build should be considered as unstable. |
java.lang.String |
getThresholdLimit()
Returns the threshold limit. |
int |
getTrendHeight()
Returns the height of the trend graph. |
java.lang.String |
getUnHealthy()
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)
Performs the publishing of the results of this plug-in. |
protected abstract BuildResult |
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 newThreshold,
java.lang.String failureThreshold,
java.lang.String newFailureThreshold,
java.lang.String healthy,
java.lang.String unHealthy,
java.lang.String height,
java.lang.String thresholdLimit,
java.lang.String pluginName)
HealthReportingMavenReporter.
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 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,
PluginLogger 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 BuildResult persistResult(ParserResult project,
hudson.maven.MavenBuild build)
project - the created projectbuild - the build (on the master)
protected 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 java.lang.String getThreshold()
getThreshold in interface HealthDescriptorpublic java.lang.String getNewThreshold()
getNewThreshold in interface HealthDescriptorpublic java.lang.String getFailureThreshold()
getFailureThreshold in interface HealthDescriptorpublic java.lang.String getNewFailureThreshold()
getNewFailureThreshold in interface HealthDescriptorpublic java.lang.String getHealthy()
getHealthy in interface HealthDescriptorpublic java.lang.String getUnHealthy()
getUnHealthy 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 | |||||||||