Package hudson.maven.reporters
Class MavenFingerprinter
- java.lang.Object
-
- hudson.maven.MavenReporter
-
- hudson.maven.reporters.MavenFingerprinter
-
- All Implemented Interfaces:
ExtensionPoint
,MavenProjectActionBuilder
,Describable<MavenReporter>
,Serializable
public class MavenFingerprinter extends MavenReporter
Records fingerprints of the builds to keep track of dependencies.- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MavenFingerprinter.DescriptorImpl
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description MavenFingerprinter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
aggregate(MavenModuleSetBuild mmsb)
CreatesFingerprinter.FingerprintAction
forMavenModuleSetBuild
by aggregating all fingerprints from module builds.boolean
postBuild(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, BuildListener listener)
Sends the collected fingerprints over to the controller and record them.boolean
postExecute(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.boolean
preBuild(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
-
-
-
-
Method Detail
-
preBuild
public boolean preBuild(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, BuildListener listener) throws InterruptedException, IOException
Description copied from class:MavenReporter
Called before the actual maven2 execution begins.- Overrides:
preBuild
in classMavenReporter
pom
- 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 theMavenReporter
implementations may simply forward the exception it got from its lower-level functions.IOException
- If the implementation wants to abort the processing when anIOException
happens, 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 catchIOException
on 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:
postExecute
in classMavenReporter
error
- If mojo execution failed withMojoFailureException
orMojoExecutionException
, this method is still invoked with those error objects. If mojo executed successfully, this parameter is null.- Throws:
InterruptedException
IOException
-
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:
postBuild
in 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
public static void aggregate(MavenModuleSetBuild mmsb) throws IOException
CreatesFingerprinter.FingerprintAction
forMavenModuleSetBuild
by aggregating all fingerprints from module builds.- Throws:
IOException
-
-