Package hudson.maven.reporters
Class SurefireArchiver
java.lang.Object
hudson.maven.MavenReporter
hudson.maven.reporters.TestFailureDetector
hudson.maven.reporters.SurefireArchiver
- All Implemented Interfaces:
ExtensionPoint,MavenProjectActionBuilder,Describable<MavenReporter>,Serializable
Records the surefire test result.
- Author:
- Kohsuke Kawaguchi, Christoph Kutzinski
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanend(MavenBuild build, Launcher launcher, BuildListener listener) Called after the maven execution finished and the result is determined.static voidfixUp(List<MavenProjectActionBuilder> builders) Up to 1.372, there was a bug that causes Hudson to persistSurefireArchiverwith the entire test result in it.booleanHave any test failures been detected?booleanpostExecute(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, MojoInfo mojo, BuildListener listener, Throwable error) Called after execution of a single mojo.booleanpreExecute(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, MojoInfo mojo, BuildListener listener) Called before execution of a single mojo.protected ObjectMethods inherited from class hudson.maven.MavenReporter
enterModule, getAggregatedProjectAction, getDescriptor, getProjectAction, getProjectActions, leaveModule, postBuild, preBuild, reportGenerated
-
Constructor Details
-
SurefireArchiver
public SurefireArchiver()
-
-
Method Details
-
hasTestFailures
public boolean hasTestFailures()Description copied from class:TestFailureDetectorHave any test failures been detected?- Specified by:
hasTestFailuresin classTestFailureDetector- Returns:
trueif there are test failures
-
preExecute
public boolean preExecute(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, MojoInfo mojo, BuildListener listener) throws InterruptedException, IOException Description copied from class:MavenReporterCalled before execution of a single mojo.When this method is invoked,
MojoInfo.mojois fully injected with its configuration values.- Overrides:
preExecutein classMavenReporter- Returns:
- See
MavenReporter.preBuild(hudson.maven.MavenBuildProxy, org.apache.maven.project.MavenProject, hudson.model.BuildListener) - Throws:
InterruptedException- SeeMavenReporter.preBuild(hudson.maven.MavenBuildProxy, org.apache.maven.project.MavenProject, hudson.model.BuildListener)IOException- SeeMavenReporter.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:MavenReporterCalled 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:
postExecutein classMavenReportererror- If mojo execution failed withMojoFailureExceptionorMojoExecutionException, this method is still invoked with those error objects. If mojo executed successfully, this parameter is null.- Throws:
InterruptedExceptionIOException
-
end
public boolean end(MavenBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException Description copied from class:MavenReporterCalled after the maven execution finished and the result is determined.This method fires after
MavenReporter.postBuild(MavenBuildProxy, MavenProject, BuildListener). Works likeBuildStepCompatibilityLayer.perform(Build, Launcher, BuildListener).- Overrides:
endin classMavenReporter- Throws:
InterruptedExceptionIOException
-
fixUp
Up to 1.372, there was a bug that causes Hudson to persistSurefireArchiverwith 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. -
readResolve
-