Package hudson.maven
Class Maven3ProcessFactory
- java.lang.Object
-
- hudson.maven.AbstractMavenProcessFactory
-
- hudson.maven.Maven3ProcessFactory
-
- Direct Known Subclasses:
Maven31ProcessFactory
,Maven32ProcessFactory
,Maven33ProcessFactory
,Maven35ProcessFactory
public class Maven3ProcessFactory extends AbstractMavenProcessFactory
AbstractMavenProcessFactory
for Maven 3.- Author:
- Olivier Lamy
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
Maven3ProcessFactory.GetClassWorldsJar
Finds classworlds.jar-
Nested classes/interfaces inherited from class hudson.maven.AbstractMavenProcessFactory
AbstractMavenProcessFactory.GetRemotingJar, AbstractMavenProcessFactory.UserInetTcpSocketHostLocator
-
-
Field Summary
-
Fields inherited from class hudson.maven.AbstractMavenProcessFactory
debugPort, MAVEN_REMOTE_USEINET_ENV_VAR_NAME, mavenRemoteUseInet, yjp
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
applyPlexusModuleContributor(hudson.remoting.Channel channel, AbstractMavenBuild<?,?> context)
Apply extension plexus modules to the newly launched Maven process.JDK
getJava(TaskListener listener)
protected String
getMainClassName()
Returns the name of the Maven main class.protected String
getMavenAgentClassPath(Maven.MavenInstallation mvn, FilePath slaveRoot, BuildListener listener)
Returns the classpath string for the maven-agent jar including classworldsMaven.MavenInstallation
getMavenInstallation(TaskListener listener)
protected String
getMavenInterceptorClassPath(Maven.MavenInstallation mvn, FilePath slaveRoot, BuildListener listener)
Returns the classpath string for the maven-interceptor jarprotected String
getMavenInterceptorCommonClassPath(Maven.MavenInstallation mvn, FilePath slaveRoot, BuildListener listener)
Returns the classpath string for the maven-interceptor jarprotected String
getMavenInterceptorOverride(Maven.MavenInstallation mvn, FilePath slaveRoot, BuildListener listener)
For Maven 2.1.x - 2.2.x we need an additional jar which overrides some classes in the other interceptor jar.String
getMavenOpts()
ProcessCache.NewProcess
newProcess(BuildListener listener, OutputStream out)
-
Methods inherited from class hudson.maven.AbstractMavenProcessFactory
addRunHeadLessOption, buildMavenAgentCmdLine, classPathEntry, getCurrentNode, getEnvVars, getJava, getLauncher, getMavenInstallation, getMavenModuleSet, getMavenOpts, newProcess
-
-
-
-
Method Detail
-
getMavenAgentClassPath
protected String getMavenAgentClassPath(Maven.MavenInstallation mvn, FilePath slaveRoot, BuildListener listener) throws IOException, InterruptedException
Description copied from class:AbstractMavenProcessFactory
Returns the classpath string for the maven-agent jar including classworlds- Specified by:
getMavenAgentClassPath
in classAbstractMavenProcessFactory
- Throws:
IOException
InterruptedException
-
getMainClassName
protected String getMainClassName()
Description copied from class:AbstractMavenProcessFactory
Returns the name of the Maven main class.- Specified by:
getMainClassName
in classAbstractMavenProcessFactory
-
getMavenInterceptorClassPath
protected String getMavenInterceptorClassPath(Maven.MavenInstallation mvn, FilePath slaveRoot, BuildListener listener) throws IOException, InterruptedException
Description copied from class:AbstractMavenProcessFactory
Returns the classpath string for the maven-interceptor jar- Specified by:
getMavenInterceptorClassPath
in classAbstractMavenProcessFactory
- Throws:
IOException
InterruptedException
-
getMavenInterceptorCommonClassPath
protected String getMavenInterceptorCommonClassPath(Maven.MavenInstallation mvn, FilePath slaveRoot, BuildListener listener) throws IOException, InterruptedException
Description copied from class:AbstractMavenProcessFactory
Returns the classpath string for the maven-interceptor jar- Overrides:
getMavenInterceptorCommonClassPath
in classAbstractMavenProcessFactory
- Throws:
IOException
InterruptedException
-
getMavenInterceptorOverride
protected String getMavenInterceptorOverride(Maven.MavenInstallation mvn, FilePath slaveRoot, BuildListener listener) throws IOException, InterruptedException
Description copied from class:AbstractMavenProcessFactory
For Maven 2.1.x - 2.2.x we need an additional jar which overrides some classes in the other interceptor jar.- Specified by:
getMavenInterceptorOverride
in classAbstractMavenProcessFactory
- Throws:
IOException
InterruptedException
-
applyPlexusModuleContributor
protected void applyPlexusModuleContributor(hudson.remoting.Channel channel, AbstractMavenBuild<?,?> context) throws InterruptedException, IOException
Description copied from class:AbstractMavenProcessFactory
Apply extension plexus modules to the newly launched Maven process.- Specified by:
applyPlexusModuleContributor
in classAbstractMavenProcessFactory
- Parameters:
channel
- Channel to the Maven process.context
- Context thatPlexusModuleContributor
needs to figure out what it needs to do.- Throws:
InterruptedException
IOException
-
newProcess
public abstract ProcessCache.NewProcess newProcess(BuildListener listener, OutputStream out) throws IOException, InterruptedException
- Parameters:
out
- The output from the process should be sent to this output stream.- Throws:
IOException
InterruptedException
-
getMavenOpts
public abstract String getMavenOpts()
-
getMavenInstallation
public abstract Maven.MavenInstallation getMavenInstallation(TaskListener listener) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
getJava
public abstract JDK getJava(TaskListener listener) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
-