|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.maven.MavenReporter
hudson.plugins.pmd.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 HealthReportBuilder |
createHealthBuilder(java.lang.String reportSingleCount,
java.lang.String reportMultipleCount)
Creates a new instance of HealthReportBuilder. |
java.lang.String |
getHealthy()
Returns the healthy threshold, i.e. |
int |
getHealthyAnnotations()
Returns the healthy threshold for annotations, i.e. |
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. |
protected java.util.Collection<Priority> |
getPriorities()
Returns the priorities that should should be considered when evaluating the build stability and health. |
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. |
int |
getUnHealthyAnnotations()
Returns the unhealthy threshold of annotations, i.e. |
boolean |
isHealthyReportEnabled()
Returns the isHealthyReportEnabled. |
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 abstract java.lang.Class<? extends hudson.model.Action> getResultActionClass()
protected hudson.FilePath getTargetPath(org.apache.maven.project.MavenProject pom)
pom - the maven pom
protected HealthReportBuilder createHealthBuilder(java.lang.String reportSingleCount,
java.lang.String reportMultipleCount)
HealthReportBuilder.
reportSingleCount - message to be shown if there is exactly one item foundreportMultipleCount - message to be shown if there are zero or more than one items
found
public boolean isThresholdEnabled()
true if a threshold has been definedpublic java.lang.String getThreshold()
public int getMinimumAnnotations()
public boolean isHealthyReportEnabled()
public java.lang.String getHealthy()
public int getHealthyAnnotations()
public java.lang.String getUnHealthy()
public int getUnHealthyAnnotations()
public java.lang.String getHeight()
public int getTrendHeight()
protected java.util.Collection<Priority> getPriorities()
public java.lang.String getThresholdLimit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||