Package hudson.maven.reporters
Class MavenFingerprinter
java.lang.Object
hudson.maven.MavenReporter
hudson.maven.reporters.MavenFingerprinter
- All Implemented Interfaces:
ExtensionPoint,MavenProjectActionBuilder,Describable<MavenReporter>,Serializable
Records fingerprints of the builds to keep track of dependencies.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaggregate(MavenModuleSetBuild mmsb) CreatesFingerprinter.FingerprintActionforMavenModuleSetBuildby aggregating all fingerprints from module builds.booleanpostBuild(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, BuildListener listener) Sends the collected fingerprints over to the controller and record them.booleanpostExecute(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, MojoInfo mojo, BuildListener listener, Throwable error) Mojos perform different dependency resolution, so we need to check this for each mojo.booleanpreBuild(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, BuildListener listener) Called before the actual maven2 execution begins.Methods inherited from class hudson.maven.MavenReporter
end, enterModule, getAggregatedProjectAction, getDescriptor, getProjectAction, getProjectActions, leaveModule, preExecute, reportGenerated
-
Constructor Details
-
MavenFingerprinter
public MavenFingerprinter()
-
-
Method Details
-
preBuild
public boolean preBuild(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, BuildListener listener) throws InterruptedException, IOException Description copied from class:MavenReporterCalled before the actual maven2 execution begins.- Overrides:
preBuildin classMavenReporterpom- Represents the POM to be executed.- Returns:
- true if the build can continue, false if there was an error and the build needs to be aborted.
- Throws:
InterruptedException- If the build is interrupted by the user (in an attempt to abort the build.) Normally theMavenReporterimplementations may simply forward the exception it got from its lower-level functions.IOException- If the implementation wants to abort the processing when anIOExceptionhappens, it can simply propagate the exception to the caller. This will cause the build to fail, with the default error message. Implementations are encouraged to catchIOExceptionon its own to provide a better error message, if it can do so, so that users have better understanding on why it failed.
-
postExecute
public boolean postExecute(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, MojoInfo mojo, BuildListener listener, Throwable error) throws InterruptedException, IOException Mojos perform different dependency resolution, so we need to check this for each mojo.- 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
-
postBuild
public boolean postBuild(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, BuildListener listener) throws InterruptedException, IOException Sends the collected fingerprints over to the controller and record them.- Overrides:
postBuildin 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)
-
aggregate
CreatesFingerprinter.FingerprintActionforMavenModuleSetBuildby aggregating all fingerprints from module builds.- Throws:
IOException
-