Class MavenBuildProxy.Filter<CORE extends MavenBuildProxy>
- java.lang.Object
-
- hudson.maven.MavenBuildProxy.Filter<CORE>
-
- All Implemented Interfaces:
MavenBuildProxy
,Serializable
- Direct Known Subclasses:
MavenBuildProxy2.Filter
- Enclosing interface:
- MavenBuildProxy
public abstract static class MavenBuildProxy.Filter<CORE extends MavenBuildProxy> extends Object implements MavenBuildProxy, Serializable
Filter forMavenBuildProxy
. Meant to be useful as the base class for other filters.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
MavenBuildProxy.Filter.AsyncInvoker
Callable
for invokingMavenBuildProxy.BuildCallable
asynchronously.-
Nested classes/interfaces inherited from interface hudson.maven.MavenBuildProxy
MavenBuildProxy.BuildCallable<V,T extends Throwable>, MavenBuildProxy.Filter<CORE extends MavenBuildProxy>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V,T extends Throwable>
Vexecute(MavenBuildProxy.BuildCallable<V,T> program)
Executes the givenMavenBuildProxy.BuildCallable
on the controller, where one has access toMavenBuild
and all the other Hudson objects.void
executeAsync(MavenBuildProxy.BuildCallable<?,?> program)
Executes the givenMavenBuildProxy.BuildCallable
asynchronously on the controller.FilePath
getArtifactsDir()
MavenBuildInformation
getMavenBuildInformation()
long
getMilliSecsSinceBuildStart()
# of milliseconds elapsed sinceMavenBuildProxy.getTimestamp()
.FilePath
getModuleSetRootDir()
Root directory of the ownerMavenModuleSet
FilePath
getProjectRootDir()
Root directory of the parent of this build.FilePath
getRootDir()
Root directory of the build.Calendar
getTimestamp()
boolean
isArchivingDisabled()
If true, artifacts will not actually be archived to controller.boolean
isSiteArchivingDisabled()
If true, artifacts will not actually be archived to controller during site deploy.void
queueArchiving(String artifactPath, String artifact)
void
registerAsAggregatedProjectAction(MavenReporter reporter)
Nominates that the reporter will contribute a project action for this build by usingMavenReporter.getAggregatedProjectAction(MavenModuleSet)
.void
registerAsProjectAction(MavenProjectActionBuilder builder)
Nominates that the reporter will contribute a project action for this build by usingMavenReporter.getProjectActions(MavenModule)
.void
registerAsProjectAction(MavenReporter reporter)
Nominates that the reporter will contribute a project action for this build by usingMavenReporter.getProjectActions(MavenModule)
.void
setExecutedMojos(List<ExecutedMojo> executedMojos)
Called at the end of the build to record what mojos are executed.void
setResult(Result result)
-
-
-
Field Detail
-
core
protected final CORE extends MavenBuildProxy core
-
-
Constructor Detail
-
Filter
protected Filter(CORE core)
-
-
Method Detail
-
execute
public <V,T extends Throwable> V execute(MavenBuildProxy.BuildCallable<V,T> program) throws T extends Throwable, IOException, InterruptedException
Description copied from interface:MavenBuildProxy
Executes the givenMavenBuildProxy.BuildCallable
on the controller, where one has access toMavenBuild
and all the other Hudson objects.The parameter, return value, and exception are all transfered by using Java serialization.
- Specified by:
execute
in interfaceMavenBuildProxy
- Returns:
- the value that
MavenBuildProxy.BuildCallable
returned. - Throws:
T
- ifMavenBuildProxy.BuildCallable
throws this exception.IOException
- if the remoting failed.InterruptedException
- if the remote execution is aborted.T extends Throwable
- See Also:
MavenBuildProxy.executeAsync(BuildCallable)
-
executeAsync
public void executeAsync(MavenBuildProxy.BuildCallable<?,?> program) throws IOException
Description copied from interface:MavenBuildProxy
Executes the givenMavenBuildProxy.BuildCallable
asynchronously on the controller.This method works like
MavenBuildProxy.execute(BuildCallable)
except that the method returns immediately and doesn't wait for the completion of the program.The completions of asynchronous executions are accounted for before the build completes. If they throw exceptions, they'll be reported and the build will be marked as a failure.
- Specified by:
executeAsync
in interfaceMavenBuildProxy
- Throws:
IOException
-
getRootDir
public FilePath getRootDir()
Description copied from interface:MavenBuildProxy
Root directory of the build.- Specified by:
getRootDir
in interfaceMavenBuildProxy
- See Also:
Run.getRootDir()
,MavenReporterDescriptor.reportedFilePattern()
-
getProjectRootDir
public FilePath getProjectRootDir()
Description copied from interface:MavenBuildProxy
Root directory of the parent of this build.- Specified by:
getProjectRootDir
in interfaceMavenBuildProxy
- See Also:
MavenReporterDescriptor.reportedFilePattern()
-
getModuleSetRootDir
public FilePath getModuleSetRootDir()
Description copied from interface:MavenBuildProxy
Root directory of the ownerMavenModuleSet
- Specified by:
getModuleSetRootDir
in interfaceMavenBuildProxy
- See Also:
MavenReporterDescriptor.reportedFilePattern()
-
getArtifactsDir
public FilePath getArtifactsDir()
- Specified by:
getArtifactsDir
in interfaceMavenBuildProxy
-
queueArchiving
public void queueArchiving(String artifactPath, String artifact)
- Specified by:
queueArchiving
in interfaceMavenBuildProxy
- Parameters:
artifactPath
- a relative/
-separated pathartifact
- absolute path name on the agent in the workspace- See Also:
ArtifactManager.archive(hudson.FilePath, hudson.Launcher, hudson.model.BuildListener, java.util.Map<java.lang.String, java.lang.String>)
-
setResult
public void setResult(Result result)
- Specified by:
setResult
in interfaceMavenBuildProxy
- See Also:
Run.setResult(Result)
-
getTimestamp
public Calendar getTimestamp()
- Specified by:
getTimestamp
in interfaceMavenBuildProxy
- See Also:
Run.getTimestamp()
-
getMilliSecsSinceBuildStart
public long getMilliSecsSinceBuildStart()
Description copied from interface:MavenBuildProxy
# of milliseconds elapsed sinceMavenBuildProxy.getTimestamp()
. Where the clock skew is involved between the controller and the Maven JVM, comparing current time on Maven JVM withMavenBuildProxy.getTimestamp()
could be problematic, but this value is more robust.- Specified by:
getMilliSecsSinceBuildStart
in interfaceMavenBuildProxy
-
isArchivingDisabled
public boolean isArchivingDisabled()
Description copied from interface:MavenBuildProxy
If true, artifacts will not actually be archived to controller. CallsMavenModuleSet.isArchivingDisabled()
.- Specified by:
isArchivingDisabled
in interfaceMavenBuildProxy
-
isSiteArchivingDisabled
public boolean isSiteArchivingDisabled()
Description copied from interface:MavenBuildProxy
If true, artifacts will not actually be archived to controller during site deploy. CallsMavenModuleSet.isSiteArchivingDisabled()
.- Specified by:
isSiteArchivingDisabled
in interfaceMavenBuildProxy
-
registerAsProjectAction
public void registerAsProjectAction(MavenReporter reporter)
Description copied from interface:MavenBuildProxy
Nominates that the reporter will contribute a project action for this build by usingMavenReporter.getProjectActions(MavenModule)
.The specified
MavenReporter
object will be transfered to the controller and will become a persisted part of theMavenBuild
.- Specified by:
registerAsProjectAction
in interfaceMavenBuildProxy
-
registerAsProjectAction
public void registerAsProjectAction(MavenProjectActionBuilder builder)
Description copied from interface:MavenBuildProxy
Nominates that the reporter will contribute a project action for this build by usingMavenReporter.getProjectActions(MavenModule)
.The specified
MavenReporter
object will be transferred to the controller and will become a persisted part of theMavenBuild
.- Specified by:
registerAsProjectAction
in interfaceMavenBuildProxy
-
registerAsAggregatedProjectAction
public void registerAsAggregatedProjectAction(MavenReporter reporter)
Description copied from interface:MavenBuildProxy
Nominates that the reporter will contribute a project action for this build by usingMavenReporter.getAggregatedProjectAction(MavenModuleSet)
.The specified
MavenReporter
object will be transfered to the controller and will become a persisted part of theMavenModuleSetBuild
.- Specified by:
registerAsAggregatedProjectAction
in interfaceMavenBuildProxy
-
setExecutedMojos
public void setExecutedMojos(List<ExecutedMojo> executedMojos)
Description copied from interface:MavenBuildProxy
Called at the end of the build to record what mojos are executed.- Specified by:
setExecutedMojos
in interfaceMavenBuildProxy
-
getMavenBuildInformation
public MavenBuildInformation getMavenBuildInformation()
- Specified by:
getMavenBuildInformation
in interfaceMavenBuildProxy
-
-