Package hudson.maven
Class AbstractMavenBuilder
- All Implemented Interfaces:
hudson.remoting.Callable<Result,
,IOException> hudson.remoting.DelegatingCallable<Result,
,IOException> Serializable
,org.jenkinsci.remoting.RoleSensitive
- Direct Known Subclasses:
Maven3Builder
,MavenBuilder
public abstract class AbstractMavenBuilder
extends MasterToSlaveCallable<Result,IOException>
implements hudson.remoting.DelegatingCallable<Result,IOException>
- Author:
- Olivier Lamy, Christoph Kutzinski
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<hudson.remoting.Future<?>>
Record all asynchronous executions as they are scheduled, to make sure they are all completed before we finish.Goals to be executed in this Maven execution.protected final BuildListener
Where error messages and so on are sent.protected Map<ModuleName,
AbstractMavenBuilder.FilterImpl> protected final Map<ModuleName,
List<MavenReporter>> protected final Map<ModuleName,
MavenBuild.ProxyImpl2> Kept so that we can finalize them in the end method.Hudson-defined system properties. -
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractMavenBuilder
(BuildListener listener, Collection<MavenModule> modules, List<String> goals, Map<String, String> systemProps) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
format
(NumberFormat n, long nanoTime) protected String
formatArgs
(List<String> args) protected void
Initialize the collection of the asynchronous executions.protected boolean
isDebug()
protected boolean
isQuiet()
protected void
recordAsynchronousExecution
(hudson.remoting.Future<?> future) Records a new asynchronous exection.protected void
Add all thejenkins environment variables
into thesystem properties
Ignoresjenkins environment variables
with empty keys.protected Result
Waits until all asynchronous executions are finished.Methods inherited from class jenkins.security.MasterToSlaveCallable
checkRoles
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.remoting.Callable
call, getChannelOrFail, getOpenChannelOrFail
Methods inherited from interface org.jenkinsci.remoting.RoleSensitive
checkRoles
-
Field Details
-
goals
Goals to be executed in this Maven execution. -
systemProps
Hudson-defined system properties. These will be made available to Maven, and accessible as if they are specified as -Dkey=value -
listener
Where error messages and so on are sent. -
proxies
-
sourceProxies
Kept so that we can finalize them in the end method. -
reporters
-
futures
Record all asynchronous executions as they are scheduled, to make sure they are all completed before we finish.
-
-
Constructor Details
-
AbstractMavenBuilder
protected AbstractMavenBuilder(BuildListener listener, Collection<MavenModule> modules, List<String> goals, Map<String, String> systemProps)
-
-
Method Details
-
formatArgs
-
registerSystemProperties
protected void registerSystemProperties()Add all thejenkins environment variables
into thesystem properties
Ignoresjenkins environment variables
with empty keys.- Throws:
IllegalArgumentException
- if ajenkins environment variable
has null value as it blows up Maven.- See Also:
-
format
-
getClassLoader
- Specified by:
getClassLoader
in interfacehudson.remoting.DelegatingCallable<Result,
IOException>
-
initializeAsynchronousExecutions
protected void initializeAsynchronousExecutions()Initialize the collection of the asynchronous executions. The method must be called in the Maven jail process i.e. inside the call method! -
recordAsynchronousExecution
protected void recordAsynchronousExecution(hudson.remoting.Future<?> future) Records a new asynchronous exection. -
waitForAsynchronousExecutions
Waits until all asynchronous executions are finished.- Returns:
- null in success case; returns an ABORT result if we were interrupted while waiting
-
isDebug
protected boolean isDebug() -
isQuiet
protected boolean isQuiet()
-