Package io.quarkus.deployment.pkg.steps
Class NativeImageBuildRunner
- java.lang.Object
-
- io.quarkus.deployment.pkg.steps.NativeImageBuildRunner
-
- Direct Known Subclasses:
NativeImageBuildContainerRunner,NativeImageBuildLocalRunner,NativeImageBuildRunnerError,NoopNativeImageBuildRunner
public abstract class NativeImageBuildRunner extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classNativeImageBuildRunner.Result
-
Constructor Summary
Constructors Constructor Description NativeImageBuildRunner()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddShutdownHook(Process buildNativeProcess)NativeImageBuildRunner.Resultbuild(List<String> args, String nativeImageName, String resultingExecutableName, Path outputDir, GraalVM.Version graalVMVersion, boolean debugSymbolsEnabled, boolean processInheritIODisabled)protected abstract String[]getBuildCommand(Path outputDir, List<String> args)GraalVM.VersiongetGraalVMVersion()protected abstract String[]getGraalVMVersionCommand(List<String> args)abstract booleanisContainer()protected abstract voidobjcopy(Path outputDir, String... args)protected booleanobjcopyExists()protected voidpostBuild(Path outputDir, String nativeImageName, String resultingExecutableName)protected voidpreBuild(Path outputDir, List<String> buildArgs)(package private) static voidrunCommand(String[] command, String errorMsg, File workingDirectory)RuncommandinworkingDirectoryand log error iferrorMsgis not null.voidsetup(boolean processInheritIODisabled)
-
-
-
Method Detail
-
getGraalVMVersion
public GraalVM.Version getGraalVMVersion()
-
isContainer
public abstract boolean isContainer()
-
setup
public void setup(boolean processInheritIODisabled)
-
addShutdownHook
public void addShutdownHook(Process buildNativeProcess)
-
build
public NativeImageBuildRunner.Result build(List<String> args, String nativeImageName, String resultingExecutableName, Path outputDir, GraalVM.Version graalVMVersion, boolean debugSymbolsEnabled, boolean processInheritIODisabled) throws InterruptedException, IOException
- Throws:
InterruptedExceptionIOException
-
objcopyExists
protected boolean objcopyExists()
-
preBuild
protected void preBuild(Path outputDir, List<String> buildArgs) throws IOException, InterruptedException
- Throws:
IOExceptionInterruptedException
-
postBuild
protected void postBuild(Path outputDir, String nativeImageName, String resultingExecutableName) throws InterruptedException, IOException
- Throws:
InterruptedExceptionIOException
-
runCommand
static void runCommand(String[] command, String errorMsg, File workingDirectory)
RuncommandinworkingDirectoryand log error iferrorMsgis not null.- Parameters:
command- The command to runerrorMsg- The error message to be printed in case of failure. Ifnullthe failure is ignored, but logged.workingDirectory- The directory in which to run the command
-
-