public abstract class AbstractMavenProcessFactory extends Object
MavenProcessFactory and Maven3ProcessFactory
adds Maven2/Maven3 flavors to it to make it concrete.| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractMavenProcessFactory.GetRemotingJar |
static class |
AbstractMavenProcessFactory.UserInetTcpSocketHostLocator |
| Modifier and Type | Field and Description |
|---|---|
static int |
debugPort
If not 0, launch Maven with a debugger port.
|
static String |
MAVEN_REMOTE_USEINET_ENV_VAR_NAME |
static boolean |
mavenRemoteUseInet |
static boolean |
yjp
If true, launch Maven with YJP offline profiler agent.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
addRunHeadLessOption(String mavenOpts) |
protected abstract void |
applyPlexusModuleContributor(hudson.remoting.Channel channel,
AbstractMavenBuild<?,?> context)
Apply extension plexus modules to the newly launched Maven process.
|
protected hudson.util.ArgumentListBuilder |
buildMavenAgentCmdLine(hudson.model.BuildListener listener,
String tcpSocket)
Builds the command line argument list to launch the maven process.
|
protected String |
classPathEntry(hudson.FilePath root,
Class<?> representative,
String seedName,
hudson.model.TaskListener listener)
Copies a Maven-related JAR to the slave on demand.
|
protected hudson.model.Node |
getCurrentNode()
Returns the current
Node on which we are buildling. |
protected hudson.EnvVars |
getEnvVars() |
hudson.model.JDK |
getJava(hudson.model.TaskListener log) |
protected hudson.Launcher |
getLauncher() |
protected abstract String |
getMainClassName()
Returns the name of the Maven main class.
|
protected abstract String |
getMavenAgentClassPath(hudson.tasks.Maven.MavenInstallation mvn,
hudson.FilePath slaveRoot,
hudson.model.BuildListener listener)
Returns the classpath string for the maven-agent jar including classworlds
|
hudson.tasks.Maven.MavenInstallation |
getMavenInstallation(hudson.model.TaskListener log) |
protected abstract String |
getMavenInterceptorClassPath(hudson.tasks.Maven.MavenInstallation mvn,
hudson.FilePath slaveRoot,
hudson.model.BuildListener listener)
Returns the classpath string for the maven-interceptor jar
|
protected String |
getMavenInterceptorCommonClassPath(hudson.tasks.Maven.MavenInstallation mvn,
hudson.FilePath slaveRoot,
hudson.model.BuildListener listener)
Returns the classpath string for the maven-interceptor jar
|
protected abstract String |
getMavenInterceptorOverride(hudson.tasks.Maven.MavenInstallation mvn,
hudson.FilePath slaveRoot,
hudson.model.BuildListener listener)
For Maven 2.1.x - 2.2.x we need an additional jar which overrides some classes in the other interceptor jar.
|
protected MavenModuleSet |
getMavenModuleSet() |
String |
getMavenOpts() |
ProcessCache.NewProcess |
newProcess(hudson.model.BuildListener listener,
OutputStream out)
Starts maven process.
|
public static boolean mavenRemoteUseInet
public static final String MAVEN_REMOTE_USEINET_ENV_VAR_NAME
public static boolean yjp
public static int debugPort
public ProcessCache.NewProcess newProcess(hudson.model.BuildListener listener, OutputStream out) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprotected abstract void applyPlexusModuleContributor(hudson.remoting.Channel channel,
AbstractMavenBuild<?,?> context)
throws InterruptedException,
IOException
channel - Channel to the Maven process.context - Context that PlexusModuleContributor needs to figure out what it needs to do.InterruptedExceptionIOExceptionprotected hudson.util.ArgumentListBuilder buildMavenAgentCmdLine(hudson.model.BuildListener listener,
String tcpSocket)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionprotected abstract String getMavenAgentClassPath(hudson.tasks.Maven.MavenInstallation mvn, hudson.FilePath slaveRoot, hudson.model.BuildListener listener) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprotected abstract String getMavenInterceptorClassPath(hudson.tasks.Maven.MavenInstallation mvn, hudson.FilePath slaveRoot, hudson.model.BuildListener listener) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprotected String getMavenInterceptorCommonClassPath(hudson.tasks.Maven.MavenInstallation mvn, hudson.FilePath slaveRoot, hudson.model.BuildListener listener) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprotected abstract String getMavenInterceptorOverride(hudson.tasks.Maven.MavenInstallation mvn, hudson.FilePath slaveRoot, hudson.model.BuildListener listener) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprotected abstract String getMainClassName()
public String getMavenOpts()
public hudson.tasks.Maven.MavenInstallation getMavenInstallation(hudson.model.TaskListener log)
throws IOException,
InterruptedException
IOExceptionInterruptedException@CheckForNull public hudson.model.JDK getJava(hudson.model.TaskListener log) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprotected final String classPathEntry(hudson.FilePath root, Class<?> representative, String seedName, hudson.model.TaskListener listener) throws IOException, InterruptedException
root - the FS root of the slave (null means running on master)representative - a representative class present in the JARseedName - the basename of the JARlistener - a listener for any problemsIOException - in case copying failsInterruptedException - in case copying is interruptedprotected hudson.model.Node getCurrentNode()
Node on which we are buildling.protected MavenModuleSet getMavenModuleSet()
protected hudson.Launcher getLauncher()
protected hudson.EnvVars getEnvVars()
Copyright © 2016–2017. All rights reserved.