hudson.maven
Class AbstractMavenProcessFactory

java.lang.Object
  extended by hudson.maven.AbstractMavenProcessFactory
Direct Known Subclasses:
Maven3ProcessFactory

public abstract class AbstractMavenProcessFactory
extends Object

Author:
Olivier Lamy

Nested Class Summary
protected static class AbstractMavenProcessFactory.GetRemotingJar
           
 
Field Summary
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.
 
Method Summary
protected  String addRunHeadLessOption(String mavenOpts)
           
protected  ArgumentListBuilder buildMavenAgentCmdLine(BuildListener listener, int tcpPort)
          Builds the command line argument list to launch the maven process.
protected  Node getCurrentNode()
          Returns the current Node on which we are buildling.
protected  EnvVars getEnvVars()
           
 JDK getJava(TaskListener log)
           
protected  Launcher getLauncher()
           
protected abstract  String getMainClassName()
          Returns the name of the Maven main class.
protected abstract  String getMavenAgentClassPath(Maven.MavenInstallation mvn, boolean isMaster, FilePath slaveRoot, BuildListener listener)
          Returns the classpath string for the maven-agent jar including classworlds
 Maven.MavenInstallation getMavenInstallation(TaskListener log)
           
protected abstract  String getMavenInterceptorClassPath(Maven.MavenInstallation mvn, boolean isMaster, FilePath slaveRoot)
          Returns the classpath string for the maven-interceptor jar
protected abstract  String getMavenInterceptorOverride(Maven.MavenInstallation mvn, boolean isMaster, FilePath slaveRoot)
          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(BuildListener listener, OutputStream out)
          Starts maven process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mavenRemoteUseInet

public static boolean mavenRemoteUseInet

MAVEN_REMOTE_USEINET_ENV_VAR_NAME

public static final String MAVEN_REMOTE_USEINET_ENV_VAR_NAME
See Also:
Constant Field Values

yjp

public static boolean yjp
If true, launch Maven with YJP offline profiler agent.


debugPort

public static int debugPort
If not 0, launch Maven with a debugger port.

Method Detail

newProcess

public ProcessCache.NewProcess newProcess(BuildListener listener,
                                          OutputStream out)
                                   throws IOException,
                                          InterruptedException
Starts maven process.

Throws:
IOException
InterruptedException

buildMavenAgentCmdLine

protected ArgumentListBuilder buildMavenAgentCmdLine(BuildListener listener,
                                                     int tcpPort)
                                              throws IOException,
                                                     InterruptedException
Builds the command line argument list to launch the maven process.

Throws:
IOException
InterruptedException

getMavenAgentClassPath

protected abstract String getMavenAgentClassPath(Maven.MavenInstallation mvn,
                                                 boolean isMaster,
                                                 FilePath slaveRoot,
                                                 BuildListener listener)
                                          throws IOException,
                                                 InterruptedException
Returns the classpath string for the maven-agent jar including classworlds

Throws:
IOException
InterruptedException

getMavenInterceptorClassPath

protected abstract String getMavenInterceptorClassPath(Maven.MavenInstallation mvn,
                                                       boolean isMaster,
                                                       FilePath slaveRoot)
                                                throws IOException,
                                                       InterruptedException
Returns the classpath string for the maven-interceptor jar

Throws:
IOException
InterruptedException

getMavenInterceptorOverride

protected abstract String getMavenInterceptorOverride(Maven.MavenInstallation mvn,
                                                      boolean isMaster,
                                                      FilePath slaveRoot)
                                               throws IOException,
                                                      InterruptedException
For Maven 2.1.x - 2.2.x we need an additional jar which overrides some classes in the other interceptor jar.

Throws:
IOException
InterruptedException

getMainClassName

protected abstract String getMainClassName()
Returns the name of the Maven main class.


getMavenOpts

public String getMavenOpts()

addRunHeadLessOption

protected String addRunHeadLessOption(String mavenOpts)

getMavenInstallation

public Maven.MavenInstallation getMavenInstallation(TaskListener log)
                                             throws IOException,
                                                    InterruptedException
Throws:
IOException
InterruptedException

getJava

public JDK getJava(TaskListener log)
            throws IOException,
                   InterruptedException
Throws:
IOException
InterruptedException

getCurrentNode

protected Node getCurrentNode()
Returns the current Node on which we are buildling.


getMavenModuleSet

protected MavenModuleSet getMavenModuleSet()

getLauncher

protected Launcher getLauncher()

getEnvVars

protected EnvVars getEnvVars()


Copyright © 2004-2013. All Rights Reserved.