Package io.quarkus.deployment.pkg.steps
Class NativeImageBuildRunner
- java.lang.Object
-
- io.quarkus.deployment.pkg.steps.NativeImageBuildRunner
-
- Direct Known Subclasses:
NativeImageBuildContainerRunner
,NativeImageBuildLocalRunner
public abstract class NativeImageBuildRunner extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
NativeImageBuildRunner.Result
-
Constructor Summary
Constructors Constructor Description NativeImageBuildRunner()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addShutdownHook(Process buildNativeProcess)
NativeImageBuildRunner.Result
build(List<String> args, String nativeImageName, String resultingExecutableName, Path outputDir, boolean debugSymbolsEnabled, boolean processInheritIODisabled)
protected abstract String[]
getBuildCommand(List<String> args)
GraalVM.Version
getGraalVMVersion()
protected abstract String[]
getGraalVMVersionCommand(List<String> args)
protected abstract void
objcopy(String... args)
protected boolean
objcopyExists()
protected void
postBuild()
protected void
preBuild(List<String> buildArgs)
(package private) static void
runCommand(String[] command, String errorMsg, File workingDirectory)
Runcommand
inworkingDirectory
and log error iferrorMsg
is not null.void
setup(boolean processInheritIODisabled)
-
-
-
Method Detail
-
getGraalVMVersion
public GraalVM.Version getGraalVMVersion()
-
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, boolean debugSymbolsEnabled, boolean processInheritIODisabled) throws InterruptedException, IOException
- Throws:
InterruptedException
IOException
-
objcopyExists
protected boolean objcopyExists()
-
objcopy
protected abstract void objcopy(String... args)
-
preBuild
protected void preBuild(List<String> buildArgs) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
postBuild
protected void postBuild() throws InterruptedException, IOException
- Throws:
InterruptedException
IOException
-
runCommand
static void runCommand(String[] command, String errorMsg, File workingDirectory)
Runcommand
inworkingDirectory
and log error iferrorMsg
is not null.- Parameters:
command
- The command to runerrorMsg
- The error message to be printed in case of failure. Ifnull
the failure is ignored, but logged.workingDirectory
- The directory in which to run the command
-
-