Class NativeImageJibMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.micronaut.maven.AbstractMicronautMojo
io.micronaut.maven.AbstractDockerMojo
io.micronaut.maven.NativeImageJibMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="native-image-jib",
requiresDependencyResolution=COMPILE_PLUS_RUNTIME)
public class NativeImageJibMojo
extends AbstractDockerMojo
Builds a container image from a locally compiled native executable with Jib Core.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanAllows packaging when the host OS/architecture differs from the selected Linux container platform.protected booleanPackages the generated native executable into a container image with Jib after native-image packaging.protected FileNative executable to copy into the image.static final Stringprotected StringRuntime base image for the native executable image.Fields inherited from class AbstractDockerMojo
appArguments, applicationConfigurationService, ARM_ARCH, baseImage, baseImageRun, DEFAULT_BASE_IMAGE_GRAALVM_BUILD, DEFAULT_BASE_IMAGE_GRAALVM_RUN, dockerService, expressionEvaluator, GDS_DOWNLOAD_URL, JIB_BUILD_GOAL_BUILD, JIB_BUILD_GOAL_BUILD_TAR, JIB_BUILD_GOAL_DOCKER_BUILD, jibBuildGoal, jibConfigurationService, LAMBDA_BOOTSTRAP_DOCKER_COMMAND_PLACEHOLDER, lambdaBootstrapArguments, LATEST_TAG, mainClass, mavenProject, mavenSession, micronautRuntime, MOSTLY_STATIC_NATIVE_IMAGE_GRAALVM_FLAG, nativeImageBuildArgs, networkMode, ORACLE_CLOUD_FUNCTION_DEFAULT_CMD, oracleLinuxVersion, staticNativeImage, X86_64_ARCHFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsConstructorDescriptionNativeImageJibMojo(org.apache.maven.project.MavenProject mavenProject, JibConfigurationService jibConfigurationService, ApplicationConfigurationService applicationConfigurationService, DockerService dockerService, org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.plugin.MojoExecution mojoExecution) -
Method Summary
Methods inherited from class AbstractDockerMojo
copyDependencies, escapeJsonString, escapeShellDoubleQuoted, getBaseImage, getCmd, getConfiguredToImage, getFrom, getFromImage, getJibFromImageSystemProperty, getLambdaBootstrapCommand, getNetworkMode, getPorts, getProxyBuildArgs, getTags, graalVmArch, graalVmDownloadUrl, graalVmJvmVersion, graalVmTag, isArm, javaVersion, jsonStringLiteral, lambdaBootstrapCommand, oracleCloudFunctionCmd, requireConfiguredToImageForJibRegistryBuild, shellLiteral, shouldBuildWithDockerfile, supportsSharedArena, validateDockerfileValue, validateDownloadUrl, validateExposedPorts, validateImageReference, validateJibBuildGoalMethods inherited from class AbstractMicronautMojo
setLogMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setPluginContext
-
Field Details
-
NATIVE_IMAGE_JIB_GOAL
- See Also:
-
enabled
@Parameter(property="micronaut.native-image.jib.enabled", defaultValue="false") protected boolean enabledPackages the generated native executable into a container image with Jib after native-image packaging. -
executable
Native executable to copy into the image. Defaults totarget/<native imageName or artifactId>. -
nativeImageJibBaseImage
@Parameter(property="micronaut.native-image.jib.base-image") protected String nativeImageJibBaseImageRuntime base image for the native executable image. Jibfrom.imagehas higher precedence. -
allowPlatformMismatch
@Parameter(property="micronaut.native-image.jib.allow-platform-mismatch", defaultValue="false") protected boolean allowPlatformMismatchAllows packaging when the host OS/architecture differs from the selected Linux container platform.
-
-
Constructor Details
-
NativeImageJibMojo
@Inject public NativeImageJibMojo(org.apache.maven.project.MavenProject mavenProject, JibConfigurationService jibConfigurationService, ApplicationConfigurationService applicationConfigurationService, DockerService dockerService, org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.plugin.MojoExecution mojoExecution)
-
-
Method Details
-
execute
- Throws:
org.apache.maven.plugin.MojoExecutionException
-