Package io.micronaut.maven
Class DockerCracMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.micronaut.maven.AbstractMicronautMojo
io.micronaut.maven.AbstractDockerMojo
io.micronaut.maven.DockerCracMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="docker-crac",
requiresDependencyResolution=COMPILE_PLUS_RUNTIME)
public class DockerCracMojo
extends AbstractDockerMojo
Implementation of the docker-crac
packaging.
WARNING: this goal is not intended to be executed directly. Instead, specify the packaging type
using the packaging
property, eg:
mvn package -Dpackaging=docker-crac
This is a two stage process. First a docker image is built that runs the application under a CRaC enabled JDK. Then the application is warmed up via a shell script. And then a checkpoint is taken via a signal using jcmd.
The second stage takes this checkpoint, and creates the final image containing it plus a run script which passes the correct flags to the CRaC enabled JDK.
- Since:
- 3.5.0
- Author:
- Tim Yates
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class io.micronaut.maven.AbstractDockerMojo
appArguments, applicationConfigurationService, baseImageRun, DEFAULT_BASE_IMAGE_GRAALVM_RUN, DEFAULT_ORACLE_LINUX_VERSION, dockerService, expressionEvaluator, GDS_DOWNLOAD_URL, jibConfigurationService, LATEST_TAG, mainClass, mavenProject, micronautRuntime, MOSTLY_STATIC_NATIVE_IMAGE_GRAALVM_FLAG, nativeImageBuildArgs, networkMode, ORACLE_CLOUD_FUNCTION_DEFAULT_CMD, oracleLinuxVersion, staticNativeImage
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
ConstructorDescriptionDockerCracMojo
(org.apache.maven.project.MavenProject mavenProject, JibConfigurationService jibConfigurationService, ApplicationConfigurationService applicationConfigurationService, DockerService dockerService, org.apache.maven.shared.filtering.MavenReaderFilter mavenReaderFilter, org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.plugin.MojoExecution mojoExecution) -
Method Summary
Methods inherited from class io.micronaut.maven.AbstractDockerMojo
copyDependencies, getBaseImage, getCmd, getFrom, getFromImage, getNetworkMode, getPorts, getTags, graalVmArch, graalVmDownloadUrl, graalVmJvmVersion, isArm, javaVersion, oracleCloudFunctionCmd
Methods inherited from class io.micronaut.maven.AbstractMicronautMojo
setLog
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setPluginContext
-
Field Details
-
DOCKER_CRAC_PACKAGING
- See Also:
-
CHECKPOINT_SCRIPT_NAME
- See Also:
-
WARMUP_SCRIPT_NAME
- See Also:
-
RUN_SCRIPT_NAME
- See Also:
-
DEFAULT_READINESS_COMMAND
- See Also:
-
CRAC_READINESS_PROPERTY
- See Also:
-
DEFAULT_CRAC_CHECKPOINT_TIMEOUT
- See Also:
-
CRAC_CHECKPOINT_NETWORK_PROPERTY
- See Also:
-
CRAC_CHECKPOINT_TIMEOUT_PROPERTY
- See Also:
-
CRAC_JAVA_VERSION
- See Also:
-
CRAC_ARCHITECTURE
- See Also:
-
CRAC_OS
- See Also:
-
DEFAULT_CRAC_OS
- See Also:
-
DEFAULT_BASE_IMAGE
- See Also:
-
ARM_ARCH
- See Also:
-
X86_64_ARCH
- See Also:
-
-
Constructor Details
-
Method Details
-
execute
- Throws:
org.apache.maven.plugin.MojoExecutionException
-