Package hudson.maven.reporters
Class MavenArtifactArchiver
java.lang.Object
hudson.maven.MavenReporter
hudson.maven.reporters.MavenArtifactArchiver
- All Implemented Interfaces:
ExtensionPoint
,MavenProjectActionBuilder
,Describable<MavenReporter>
,Serializable
Archives artifacts of the build.
Archive will be created in two places. One is inside the build directory, to be served from Jenkins. The other is to the local repository of the controller, so that artifacts can be shared in maven builds happening in other agents.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
postBuild
(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, BuildListener listener) Called after a build of one maven2 module is completed.boolean
preBuild
(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, BuildListener listener) Called before the actual maven2 execution begins.boolean
preExecute
(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, MojoInfo mojo, BuildListener listener) Called before execution of a single mojo.Methods inherited from class hudson.maven.MavenReporter
end, enterModule, getAggregatedProjectAction, getDescriptor, getProjectAction, getProjectActions, leaveModule, postExecute, reportGenerated
-
Constructor Details
-
MavenArtifactArchiver
public MavenArtifactArchiver()
-
-
Method Details
-
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.
-
preExecute
public boolean preExecute(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, MojoInfo mojo, BuildListener listener) throws InterruptedException, IOException Description copied from class:MavenReporter
Called before execution of a single mojo.When this method is invoked,
MojoInfo.mojo
is fully injected with its configuration values.- Overrides:
preExecute
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)
-
postBuild
public boolean postBuild(MavenBuildProxy build, org.apache.maven.project.MavenProject pom, BuildListener listener) throws InterruptedException, IOException Description copied from class:MavenReporter
Called after a build of one maven2 module is completed.Note that at this point the build result is still not determined.
- 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)
-