Package io.micronaut.build
Class AbstractDockerMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- io.micronaut.build.AbstractDockerMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
DockerfileMojo
,DockerMojo
,DockerNativeMojo
,DockerPushMojo
public abstract class AbstractDockerMojo extends org.apache.maven.plugin.AbstractMojo
Abstract base class for mojos related to Docker files and builds.- Since:
- 1.1
- Author:
- Álvaro Sánchez-Mariscal
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>
appArguments
List of additional arguments that will be passed to the application.protected ApplicationConfigurationService
applicationConfigurationService
protected DockerService
dockerService
protected JibConfigurationService
jibConfigurationService
protected String
mainClass
The main class of the application, as defined in the Exec Maven Plugin.protected org.apache.maven.project.MavenProject
mavenProject
protected String
micronautRuntime
The target runtime of the applicationprotected String
nativeImageBuildArgs
Additional arguments that will be passed to thenative-image
executable.protected Boolean
staticNativeImage
Whether to produce a static native image when usingdocker-native
packaging
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDockerMojo(org.apache.maven.project.MavenProject mavenProject, JibConfigurationService jibConfigurationService, ApplicationConfigurationService applicationConfigurationService, DockerService dockerService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
copyDependencies()
protected String
getCmd()
protected String
getFrom()
protected String
getPort()
protected Set<String>
getTags()
protected String
graalVmJvmVersion()
protected String
graalVmVersion()
protected org.apache.maven.artifact.versioning.ArtifactVersion
javaVersion()
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
mavenProject
protected final org.apache.maven.project.MavenProject mavenProject
-
jibConfigurationService
protected final JibConfigurationService jibConfigurationService
-
applicationConfigurationService
protected final ApplicationConfigurationService applicationConfigurationService
-
dockerService
protected final DockerService dockerService
-
nativeImageBuildArgs
@Parameter(property="micronaut.native-image.args") protected String nativeImageBuildArgs
Additional arguments that will be passed to thenative-image
executable. Note that this will only be used when using a packaging of typedocker-native
. Fornative-image
packaging you should use the Native Image Maven Plugin configuration options.
-
appArguments
@Parameter(property="mn.appArgs") protected List<String> appArguments
List of additional arguments that will be passed to the application.
-
mainClass
@Parameter(defaultValue="${exec.mainClass}", required=true) protected String mainClass
The main class of the application, as defined in the Exec Maven Plugin.
-
staticNativeImage
@Parameter(defaultValue="false", property="micronaut.native-image.static") protected Boolean staticNativeImage
Whether to produce a static native image when usingdocker-native
packaging
-
micronautRuntime
@Parameter(property="micronaut.runtime", defaultValue="NONE") protected String micronautRuntime
The target runtime of the application
-
-
Constructor Detail
-
AbstractDockerMojo
protected AbstractDockerMojo(org.apache.maven.project.MavenProject mavenProject, JibConfigurationService jibConfigurationService, ApplicationConfigurationService applicationConfigurationService, DockerService dockerService)
-
-
Method Detail
-
javaVersion
protected org.apache.maven.artifact.versioning.ArtifactVersion javaVersion()
-
graalVmVersion
protected String graalVmVersion()
-
graalVmJvmVersion
protected String graalVmJvmVersion()
-
getFrom
protected String getFrom()
-
getPort
protected String getPort()
-
copyDependencies
protected void copyDependencies() throws IOException
- Throws:
IOException
-
getCmd
protected String getCmd()
-
-