hudson.plugins.emma
Class EmmaPublisher

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Publisher
          extended by hudson.tasks.Recorder
              extended by hudson.plugins.emma.EmmaPublisher
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Publisher>, hudson.tasks.BuildStep

public class EmmaPublisher
extends hudson.tasks.Recorder

Publisher that captures Emma coverage reports.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class EmmaPublisher.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.tasks.Publisher
hudson.tasks.Publisher.DescriptorExtensionListImpl
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Field Summary
static hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher> DESCRIPTOR
           
 EmmaHealthReportThresholds healthReports
          HealthReport thresholds to apply.
 String includes
          Relative path to the Emma XML file inside the workspace.
 Rule rule
          Rule to be enforced.
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
EmmaPublisher()
           
 
Method Summary
 hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher> getDescriptor()
           
 hudson.model.Action getProjectAction(hudson.model.AbstractProject<?,?> project)
           
 hudson.tasks.BuildStepMonitor getRequiredMonitorService()
           
protected static hudson.FilePath[] locateCoverageReports(hudson.FilePath workspace, String includes)
          look for emma reports based in the configured parameter includes.
 boolean perform(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
protected static void saveCoverageReports(hudson.FilePath folder, hudson.FilePath[] files)
          save emma reports from the workspace to build folder
 
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRun, needsToRunAfterFinalized, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectActions, 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
getProjectActions, prebuild
 

Field Detail

includes

public String includes
Relative path to the Emma XML file inside the workspace.


rule

public Rule rule
Rule to be enforced. Can be null. TODO: define a configuration mechanism.


healthReports

public EmmaHealthReportThresholds healthReports
HealthReport thresholds to apply.


DESCRIPTOR

@Extension
public static final hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher> DESCRIPTOR
Constructor Detail

EmmaPublisher

public EmmaPublisher()
Method Detail

locateCoverageReports

protected static hudson.FilePath[] locateCoverageReports(hudson.FilePath workspace,
                                                         String includes)
                                                  throws IOException,
                                                         InterruptedException
look for emma reports based in the configured parameter includes. 'includes' is - an Ant-style pattern - a list of files and folders separated by the characters ;:,

Throws:
IOException
InterruptedException

saveCoverageReports

protected static void saveCoverageReports(hudson.FilePath folder,
                                          hudson.FilePath[] files)
                                   throws IOException,
                                          InterruptedException
save emma reports from the workspace to build folder

Throws:
IOException
InterruptedException

perform

public boolean perform(hudson.model.AbstractBuild<?,?> build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
                throws InterruptedException,
                       IOException
Specified by:
perform in interface hudson.tasks.BuildStep
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
Throws:
InterruptedException
IOException

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

getRequiredMonitorService

public hudson.tasks.BuildStepMonitor getRequiredMonitorService()

getDescriptor

public hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher> getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.Publisher>
Overrides:
getDescriptor in class hudson.tasks.Recorder


Copyright © 2004-2012 Hudson. All Rights Reserved.