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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MavenFingerprinter
public MavenFingerprinter()
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 class MavenReporter
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 the MavenReporter
implementations may simply forward the exception
it got from its lower-level functions.
IOException
- If the implementation wants to abort the processing when an IOException
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 catch IOException
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 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
postBuild
public boolean postBuild(MavenBuildProxy build,
org.apache.maven.project.MavenProject pom,
BuildListener listener)
throws InterruptedException,
IOException
- Sends the collected fingerprints over to the master and record them.
- Overrides:
postBuild
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)
aggregate
public static void aggregate(MavenModuleSetBuild mmsb)
throws IOException
- Creates
Fingerprinter.FingerprintAction
for MavenModuleSetBuild
by aggregating all fingerprints from module builds.
- Throws:
IOException
Copyright © 2004-2013. All Rights Reserved.