Package hudson.maven
Class MavenBuild.ProxyImpl2
java.lang.Object
hudson.maven.MavenBuild.ProxyImpl2
- All Implemented Interfaces:
MavenBuildProxy
,MavenBuildProxy2
,Serializable
- Enclosing class:
- MavenBuild
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.maven.MavenBuildProxy
MavenBuildProxy.BuildCallable<V,
T extends Throwable>, MavenBuildProxy.Filter<CORE extends MavenBuildProxy> Nested classes/interfaces inherited from interface hudson.maven.MavenBuildProxy2
MavenBuildProxy2.Filter<CORE extends MavenBuildProxy2>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Sends the accumulated log inSplittableBuildListener
to the log of this build.protected void
close()
Performs final clean up.void
end()
Notifies that the build has left a module.<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.final void
executeAsync
(MavenBuildProxy.BuildCallable<?, ?> program) Deprecated.This helps IDE find coding mistakes when someone tries to call this method.Deprecated.Does not work withArtifactManager
.long
# of milliseconds elapsed sinceMavenBuildProxy.getTimestamp()
.Root directory of the ownerMavenModuleSet
Root directory of the parent of this build.Root directory of the build.boolean
If true, artifacts will not actually be archived to controller.boolean
If true, artifacts will not actually be archived to controller during site deploy.owner()
Gets the build for which this proxy is created.void
queueArchiving
(String artifactPath, String artifact) void
Nominates that the reporter will contribute a project action for this build by usingMavenReporter.getAggregatedProjectAction(MavenModuleSet)
.void
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)
.protected void
setBlockBuildEvents
(boolean blockBuildEvents) void
setExecutedMojos
(List<ExecutedMojo> executedMojos) Called at the end of the build to record what mojos are executed.void
void
start()
Notifies that the build has entered a module.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.maven.MavenBuildProxy
execute, executeAsync, getArtifactsDir, getMavenBuildInformation, getMilliSecsSinceBuildStart, getModuleSetRootDir, getProjectRootDir, getRootDir, getTimestamp, isArchivingDisabled, isSiteArchivingDisabled, queueArchiving, registerAsAggregatedProjectAction, registerAsProjectAction, registerAsProjectAction, setExecutedMojos, setResult
-
Method Details
-
start
public void start()Description copied from interface:MavenBuildProxy2
Notifies that the build has entered a module. Jenkins has a somewhat simplified view of the sequence of events in a Maven build. Namely, a Maven build can be building a particular Maven module, and start and end marks that boundary. Note that Maven can be in a state that it's not building any module, for example when executing an aggregator mojo, and start/end cannot be nested (which right now means a forked lifecycle doesn't result in the event firing.)- Specified by:
start
in interfaceMavenBuildProxy2
-
end
public void end()Description copied from interface:MavenBuildProxy2
Notifies that the build has left a module.- Specified by:
end
in interfaceMavenBuildProxy2
-
appendLastLog
public void appendLastLog()Sends the accumulated log inSplittableBuildListener
to the log of this build.- Specified by:
appendLastLog
in interfaceMavenBuildProxy2
-
close
protected void close()Performs final clean up. Invoked after the entire aggregator build is completed. -
owner
Gets the build for which this proxy is created. -
setBlockBuildEvents
protected void setBlockBuildEvents(boolean blockBuildEvents) -
execute
public <V,T extends Throwable> V execute(MavenBuildProxy.BuildCallable<V, T> program) throws T, IOException, InterruptedExceptionDescription 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.- See Also:
-
executeAsync
Deprecated.This helps IDE find coding mistakes when someone tries to call this method.This method is implemented by the remote proxy before the invocation gets to this. So correct code shouldn't be invoking this method on the controller ever.- Specified by:
executeAsync
in interfaceMavenBuildProxy
- Throws:
IOException
-
getRootDir
Description copied from interface:MavenBuildProxy
Root directory of the build.- Specified by:
getRootDir
in interfaceMavenBuildProxy
- See Also:
-
getProjectRootDir
Description copied from interface:MavenBuildProxy
Root directory of the parent of this build.- Specified by:
getProjectRootDir
in interfaceMavenBuildProxy
- See Also:
-
getModuleSetRootDir
Description copied from interface:MavenBuildProxy
Root directory of the ownerMavenModuleSet
- Specified by:
getModuleSetRootDir
in interfaceMavenBuildProxy
- See Also:
-
getArtifactsDir
Deprecated.Does not work withArtifactManager
.- Specified by:
getArtifactsDir
in interfaceMavenBuildProxy
-
queueArchiving
- Specified by:
queueArchiving
in interfaceMavenBuildProxy
- Parameters:
artifactPath
- a relative/
-separated pathartifact
- absolute path name on the agent in the workspace- See Also:
-
setResult
- Specified by:
setResult
in interfaceMavenBuildProxy
- See Also:
-
getTimestamp
- Specified by:
getTimestamp
in interfaceMavenBuildProxy
- See Also:
-
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
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
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
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
Description copied from interface:MavenBuildProxy
Called at the end of the build to record what mojos are executed.- Specified by:
setExecutedMojos
in interfaceMavenBuildProxy
-
getMavenBuildInformation
- Specified by:
getMavenBuildInformation
in interfaceMavenBuildProxy
-