Package hudson.maven

Class MavenReporter

java.lang.Object
hudson.maven.MavenReporter
All Implemented Interfaces:
ExtensionPoint, MavenProjectActionBuilder, Describable<MavenReporter>, Serializable
Direct Known Subclasses:
AbstractMavenJavadocArchiver, BuildInfoRecorder, MavenArtifactArchiver, MavenFingerprinter, MavenMailer, MavenSiteArchiver, ReportCollector, TestFailureDetector

public abstract class MavenReporter extends Object implements Describable<MavenReporter>, ExtensionPoint, Serializable, MavenProjectActionBuilder
Listens to the build execution of MavenBuild, and normally records some information and exposes thoses in MavenBuild later.

MavenReporter is first instanciated on the controller. Then during the build, it is serialized and sent over into the maven process by serialization. Reporters will then receive event callbacks as mojo execution progresses. Those event callbacks are the ones that take MavenBuildProxy.

Once the maven build completes normally or abnormally, the reporters will be sent back to the controller by serialization again, then have its end(MavenBuild, Launcher, BuildListener) method invoked. This is a good opportunity to perform the post-build action.

This is the MavenBuild equivalent of BuildStep. Instances of MavenReporters are persisted with MavenModule/MavenModuleSet, possibly with configuration specific to that job.

Callback Firing Sequence

The callback methods are invoked in the following order:

 SEQUENCE := preBuild MODULE* postBuild end
 MODULE   := enterModule MOJO+ leaveModule
 MOJO     := preExecute postExecute
 

When an error happens, the call sequence could be terminated at any point and no further callback methods may be invoked.

Action

MavenReporter can contribute Action to MavenBuild so that the report can be displayed in the web UI.

Such action can also implement AggregatableAction if it further wishes to contribute a separate action to MavenModuleSetBuild. This mechanism is usually used to provide aggregated report for all the module builds.

Author:
Kohsuke Kawaguchi
See Also: