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
-
-
Constructor Summary
Constructors Constructor Description NativeImageBuildRunner()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intbuild(List<String> args, String nativeImageName, String resultingExecutableName, Path outputDir, boolean debugEnabled, boolean processInheritIODisabled)protected abstract String[]getBuildCommand(List<String> args)GraalVM.VersiongetGraalVMVersion()protected abstract String[]getGraalVMVersionCommand(List<String> args)protected abstract voidobjcopy(String... args)protected booleanobjcopyExists()protected voidpostBuild()protected voidpreBuild(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()
-
setup
public void setup(boolean processInheritIODisabled)
-
build
public int build(List<String> args, String nativeImageName, String resultingExecutableName, Path outputDir, boolean debugEnabled, boolean processInheritIODisabled) throws InterruptedException, IOException
- Throws:
InterruptedExceptionIOException
-
objcopyExists
protected boolean objcopyExists()
-
objcopy
protected abstract void objcopy(String... args)
-
preBuild
protected void preBuild(List<String> buildArgs) throws IOException, InterruptedException
- Throws:
IOExceptionInterruptedException
-
postBuild
protected void postBuild() 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
-
-