hudson.plugins.findbugs
Class FindBugsPublisher
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.plugins.findbugs.util.HealthAwarePublisher
hudson.plugins.findbugs.FindBugsPublisher
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Publisher>, hudson.tasks.BuildStep
public class FindBugsPublisher
- extends HealthAwarePublisher
Publishes the results of the FindBugs analysis.
- Author:
- Ulli Hafner
| Nested classes/interfaces inherited from interface hudson.tasks.BuildStep |
hudson.tasks.BuildStep.PublisherList |
| Fields inherited from interface hudson.tasks.BuildStep |
BUILDERS, PUBLISHERS |
|
Constructor Summary |
FindBugsPublisher(java.lang.String pattern,
java.lang.String threshold,
java.lang.String healthy,
java.lang.String unHealthy)
Creates a new instance of FindBugsPublisher. |
|
Method Summary |
hudson.model.Descriptor<hudson.tasks.Publisher> |
getDescriptor()
|
hudson.model.Action |
getProjectAction(hudson.model.AbstractProject<?,?> project)
|
boolean |
perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Scans the workspace and parses all found FindBugs XML files. |
| Methods inherited from class hudson.tasks.Publisher |
getProjectAction, needsToRunAfterFinalized, prebuild |
| Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer |
perform, prebuild |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hudson.tasks.BuildStep |
prebuild |
FIND_BUGS_DESCRIPTOR
public static final PluginDescriptor FIND_BUGS_DESCRIPTOR
- Descriptor of this publisher.
FindBugsPublisher
public FindBugsPublisher(java.lang.String pattern,
java.lang.String threshold,
java.lang.String healthy,
java.lang.String unHealthy)
- Creates a new instance of
FindBugsPublisher.
- Parameters:
pattern - Ant file-set pattern to scan for FindBugs filesthreshold - 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 value
getProjectAction
public hudson.model.Action getProjectAction(hudson.model.AbstractProject<?,?> project)
-
- Specified by:
getProjectAction in interface hudson.tasks.BuildStep- Overrides:
getProjectAction in class hudson.tasks.BuildStepCompatibilityLayer
perform
public boolean perform(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws java.lang.InterruptedException,
java.io.IOException
- Scans the workspace and parses all found FindBugs XML files. Then, the
annotations of all files are merged and persisted for a build. Finally,
the number of bugs are counted and the result of the build is set
accordingly (
HealthAwarePublisher.getThreshold().
- Specified by:
perform in interface hudson.tasks.BuildStep- Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
- Parameters:
build - the buildlauncher - the launcherlistener - the build listener
- Returns:
true if the build could continue
- Throws:
java.io.IOException - if the files could not be copied
java.lang.InterruptedException - if user cancels the operation
getDescriptor
public hudson.model.Descriptor<hudson.tasks.Publisher> getDescriptor()
-
Copyright © 2008. All Rights Reserved.