@Deprecated @Component(role=BuildTool.class) public class BuildTool extends java.lang.Object implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable
Modifier and Type | Class and Description |
---|---|
private static class |
BuildTool.LoggerHandler
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
private org.apache.maven.shared.invoker.Invoker |
mavenInvoker
Deprecated.
|
static java.lang.String |
ROLE
Deprecated.
Plexus role
|
Constructor and Description |
---|
BuildTool()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
private void |
closeHandlers(org.apache.maven.shared.invoker.InvocationRequest request)
Deprecated.
If we're logging output to a log file using standard output handlers, make sure these are
closed.
|
org.apache.maven.shared.invoker.InvocationRequest |
createBasicInvocationRequest(java.io.File pom,
java.util.Properties properties,
java.util.List<java.lang.String> goals,
java.io.File buildLogFile)
Deprecated.
Construct a standardized InvocationRequest given the test-build POM, a set of CLI properties,
a list of goals to execute, and the location of a log file to which build output should be
directed.
|
void |
dispose()
Deprecated.
Not currently used; when this API switches to use the Maven Embedder, it will be used to
shutdown the embedder and its associated container, to free up JVM memory.
|
org.apache.maven.shared.invoker.InvocationResult |
executeMaven(java.io.File pom,
java.util.Properties properties,
java.util.List<java.lang.String> goals,
java.io.File buildLogFile)
Deprecated.
Build a standard InvocationRequest using the specified test-build POM, command-line properties,
goals, and output logfile.
|
org.apache.maven.shared.invoker.InvocationResult |
executeMaven(org.apache.maven.shared.invoker.InvocationRequest request)
Deprecated.
Execute a test build using a customized InvocationRequest.
|
void |
initialize()
Deprecated.
Initialize this tool once it's been instantiated and composed, in order to start up the
MavenInvoker instance.
|
private void |
startInvoker()
Deprecated.
Detect the location of the local Maven installation, and start up the MavenInvoker using that
path.
|
public static final java.lang.String ROLE
private org.apache.maven.shared.invoker.Invoker mavenInvoker
public org.apache.maven.shared.invoker.InvocationResult executeMaven(java.io.File pom, java.util.Properties properties, java.util.List<java.lang.String> goals, java.io.File buildLogFile) throws TestToolsException
pom
- The test-build POMproperties
- command-line properties to fine-tune the test build, or test parameter
extraction from CLI propertiesgoals
- The list of goals and/or lifecycle phases to execute during this buildbuildLogFile
- The logfile used to capture build outputTestToolsException
- if anypublic org.apache.maven.shared.invoker.InvocationResult executeMaven(org.apache.maven.shared.invoker.InvocationRequest request) throws TestToolsException
createBasicInvocationRequest
method in this class.request
- The customized InvocationRequest containing the configuration used to execute
the current test buildTestToolsException
- if anyprivate void startInvoker() throws java.io.IOException
maven.home
, and falls back to the shell
environment variable M2_HOME
.java.io.IOException
- in case the shell environment variables cannot be readprivate void closeHandlers(org.apache.maven.shared.invoker.InvocationRequest request)
request
- public org.apache.maven.shared.invoker.InvocationRequest createBasicInvocationRequest(java.io.File pom, java.util.Properties properties, java.util.List<java.lang.String> goals, java.io.File buildLogFile)
pom
- The POM for the test buildproperties
- The command-line properties for use in this test buildgoals
- The goals and/or lifecycle phases to execute during the test buildbuildLogFile
- Location to which build output should be loggedpublic void initialize() throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
initialize
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
- if anypublic void dispose()
dispose
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable