hudson.maven.reporters
Class SurefireArchiver

java.lang.Object
  extended by hudson.maven.MavenReporter
      extended by hudson.maven.reporters.SurefireArchiver
All Implemented Interfaces:
ExtensionPoint, MavenProjectActionBuilder, Describable<MavenReporter>, Serializable

public class SurefireArchiver
extends MavenReporter

Records the surefire test result.

Author:
Kohsuke Kawaguchi
See Also:
Serialized Form

Nested Class Summary
static class SurefireArchiver.DescriptorImpl
           
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
SurefireArchiver()
           
 
Method Summary
static void fixUp(List<MavenProjectActionBuilder> builders)
          Up to 1.372, there was a bug that causes Hudson to persist SurefireArchiver with the entire test result in it.
 boolean maven3orLater(String mavenVersion)
           
 boolean postExecute(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, MojoInfo mojo, BuildListener listener, Throwable error)
          Called after execution of a single mojo.
 boolean preExecute(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, MojoInfo mojo, BuildListener listener)
          Called before execution of a single mojo.
 
Methods inherited from class hudson.maven.MavenReporter
end, enterModule, getAggregatedProjectAction, getDescriptor, getProjectAction, getProjectActions, leaveModule, postBuild, preBuild, reportGenerated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SurefireArchiver

public SurefireArchiver()
Method Detail

preExecute

public boolean preExecute(MavenBuildProxy build,
                          org.apache.maven.project.MavenProject pom,
                          MojoInfo mojo,
                          BuildListener listener)
                   throws InterruptedException,
                          IOException
Description copied from class: MavenReporter
Called before execution of a single mojo.

When this method is invoked, MojoInfo.mojo is fully injected with its configuration values.

Overrides:
preExecute in class MavenReporter
Returns:
See MavenReporter.preBuild(hudson.maven.MavenBuildProxy, org.apache.maven.project.MavenProject, hudson.model.BuildListener)
Throws:
InterruptedException - See MavenReporter.preBuild(hudson.maven.MavenBuildProxy, org.apache.maven.project.MavenProject, hudson.model.BuildListener)
IOException - See MavenReporter.preBuild(hudson.maven.MavenBuildProxy, org.apache.maven.project.MavenProject, hudson.model.BuildListener)

postExecute

public boolean postExecute(MavenBuildProxy build,
                           org.apache.maven.project.MavenProject pom,
                           MojoInfo mojo,
                           BuildListener listener,
                           Throwable error)
                    throws InterruptedException,
                           IOException
Description copied from class: MavenReporter
Called after execution of a single mojo.

See MavenReporter.preExecute(hudson.maven.MavenBuildProxy, org.apache.maven.project.MavenProject, hudson.maven.MojoInfo, hudson.model.BuildListener) for the contract.

Overrides:
postExecute in class MavenReporter
error - If mojo execution failed with MojoFailureException or MojoExecutionException, this method is still invoked with those error objects. If mojo executed successfully, this parameter is null.
Throws:
InterruptedException
IOException

fixUp

public static void fixUp(List<MavenProjectActionBuilder> builders)
Up to 1.372, there was a bug that causes Hudson to persist SurefireArchiver with the entire test result in it. If we are loading those, fix it up in memory to reduce the memory footprint. It'd be nice we can save the record to remove problematic portion, but that might have additional side effect.


maven3orLater

public boolean maven3orLater(String mavenVersion)


Copyright © 2004-2011. All Rights Reserved.