Package io.helidon.build.dev.maven
Class EmbeddedMavenExecutor
- java.lang.Object
-
- io.helidon.build.dev.BuildExecutor
-
- io.helidon.build.dev.maven.EmbeddedMavenExecutor
-
public class EmbeddedMavenExecutor extends BuildExecutor
ABuildExecutorthat executes within the current process. Uses reflection to avoid build time dependencies, so assume usage within a maven plugin or some equivalent that sets up the thread contextClassLoadercorrectly.
-
-
Constructor Summary
Constructors Constructor Description EmbeddedMavenExecutor(Path projectDir, BuildMonitor monitor)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(String... args)Execute maven with the given arguments.booleanwillFork()Returns whether or not this executor will fork the maven process.-
Methods inherited from class io.helidon.build.dev.BuildExecutor
execute, monitor, projectDirectory
-
-
-
-
Constructor Detail
-
EmbeddedMavenExecutor
public EmbeddedMavenExecutor(Path projectDir, BuildMonitor monitor)
Constructor.- Parameters:
projectDir- The project directory.monitor- The build monitor. All output is written toBuildMonitor.stdOutConsumer()andBuildMonitor.stdErrConsumer().
-
-
Method Detail
-
willFork
public boolean willFork()
Description copied from class:BuildExecutorReturns whether or not this executor will fork the maven process.- Specified by:
willForkin classBuildExecutor- Returns:
trueif will fork.
-
execute
public void execute(String... args) throws Exception
Description copied from class:BuildExecutorExecute maven with the given arguments.- Specified by:
executein classBuildExecutor- Parameters:
args- The maven arguments.- Throws:
Exception- on error.
-
-