Package io.quarkus.deployment.pkg.steps
Class NativeImageBuildRunner
java.lang.Object
io.quarkus.deployment.pkg.steps.NativeImageBuildRunner
- Direct Known Subclasses:
NativeImageBuildContainerRunner,NativeImageBuildLocalRunner,NativeImageBuildRunnerError,NoopNativeImageBuildRunner
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild(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) protected abstract String[]getGraalVMVersionCommand(List<String> args) abstract booleanprotected abstract voidprotected booleanprotected voidprotected void(package private) static voidrunCommand(String[] command, String errorMsg) Runcommandand log error iferrorMsgis not null.(package private) static voidrunCommand(String[] command, String errorMsg, File workingDirectory) RuncommandinworkingDirectoryand log error iferrorMsgis not null.voidsetup(boolean processInheritIODisabled)
-
Constructor Details
-
NativeImageBuildRunner
public NativeImageBuildRunner()
-
-
Method Details
-
getGraalVMVersion
-
isContainer
public abstract boolean isContainer() -
setup
public void setup(boolean processInheritIODisabled) -
build
public void build(List<String> args, String nativeImageName, String resultingExecutableName, Path outputDir, GraalVM.Version graalVMVersion, boolean debugSymbolsEnabled, boolean processInheritIODisabled) throws InterruptedException, IOException - Throws:
InterruptedExceptionIOException
-
getGraalVMVersionCommand
-
getBuildCommand
-
objcopyExists
protected boolean objcopyExists() -
objcopy
-
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
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
-
runCommand
Runcommandand log error iferrorMsgis not null.- Parameters:
command-errorMsg-
-