Class AbstractNativeImageMojo

    • Field Detail

      • NATIVE_IMAGE_META_INF

        protected static final java.lang.String NATIVE_IMAGE_META_INF
        See Also:
        Constant Field Values
      • NATIVE_IMAGE_PROPERTIES_FILENAME

        protected static final java.lang.String NATIVE_IMAGE_PROPERTIES_FILENAME
        See Also:
        Constant Field Values
      • NATIVE_IMAGE_DRY_RUN

        protected static final java.lang.String NATIVE_IMAGE_DRY_RUN
        See Also:
        Constant Field Values
      • plugin

        @Parameter(defaultValue="${plugin}",
                   readonly=true)
        protected org.apache.maven.plugin.descriptor.PluginDescriptor plugin
      • session

        @Parameter(defaultValue="${session}",
                   readonly=true)
        protected org.apache.maven.execution.MavenSession session
      • mojoExecution

        @Parameter(defaultValue="${mojoExecution}")
        protected org.apache.maven.plugin.MojoExecution mojoExecution
      • pluginArtifacts

        @Parameter(property="plugin.artifacts",
                   required=true,
                   readonly=true)
        protected java.util.List<org.apache.maven.artifact.Artifact> pluginArtifacts
      • outputDirectory

        @Parameter(defaultValue="${project.build.directory}",
                   property="outputDir",
                   required=true)
        protected java.io.File outputDirectory
      • mainClass

        @Parameter(property="mainClass")
        protected java.lang.String mainClass
      • imageName

        @Parameter(property="imageName",
                   defaultValue="${project.artifactId}")
        protected java.lang.String imageName
      • classpath

        @Parameter(property="classpath")
        protected java.util.List<java.lang.String> classpath
      • classesDirectory

        @Parameter(property="classesDirectory")
        protected java.io.File classesDirectory
      • defaultClassesDirectory

        @Parameter(defaultValue="${project.build.outputDirectory}",
                   readonly=true,
                   required=true)
        protected java.io.File defaultClassesDirectory
      • imageClasspath

        protected final java.util.List<java.nio.file.Path> imageClasspath
      • debug

        @Parameter(property="debug",
                   defaultValue="false")
        protected boolean debug
      • fallback

        @Parameter(property="fallback",
                   defaultValue="false")
        protected boolean fallback
      • verbose

        @Parameter(property="verbose",
                   defaultValue="false")
        protected boolean verbose
      • sharedLibrary

        @Parameter(property="sharedLibrary",
                   defaultValue="false")
        protected boolean sharedLibrary
      • quickBuild

        @Parameter(property="quickBuild",
                   defaultValue="false")
        protected boolean quickBuild
      • useArgFile

        @Parameter(property="useArgFile")
        protected java.lang.Boolean useArgFile
      • buildArgs

        @Parameter(property="buildArgs")
        protected java.util.List<java.lang.String> buildArgs
      • resourcesConfigDirectory

        @Parameter(defaultValue="${project.build.directory}/native/generated",
                   property="resourcesConfigDirectory",
                   required=true)
        protected java.io.File resourcesConfigDirectory
      • agentResourceDirectory

        @Parameter(property="agentResourceDirectory")
        protected java.io.File agentResourceDirectory
      • environment

        @Parameter(property="environmentVariables")
        protected java.util.Map<java.lang.String,​java.lang.String> environment
      • systemProperties

        @Parameter(property="systemPropertyVariables")
        protected java.util.Map<java.lang.String,​java.lang.String> systemProperties
      • configFiles

        @Parameter(property="configurationFileDirectories")
        protected java.util.List<java.lang.String> configFiles
      • jvmArgs

        @Parameter(property="jvmArgs")
        protected java.util.List<java.lang.String> jvmArgs
      • dryRun

        @Parameter(property="nativeDryRun",
                   defaultValue="false")
        protected boolean dryRun
      • requiredVersion

        @Parameter(property="requiredVersion")
        protected java.lang.String requiredVersion
      • toolchainManager

        @Component
        protected org.apache.maven.toolchain.ToolchainManager toolchainManager
    • Constructor Detail

      • AbstractNativeImageMojo

        @Inject
        protected AbstractNativeImageMojo()
    • Method Detail

      • getBuildArgs

        protected java.util.List<java.lang.String> getBuildArgs()
                                                         throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • processSupportedArtifacts

        protected java.nio.file.Path processSupportedArtifacts​(org.apache.maven.artifact.Artifact artifact)
                                                        throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • processArtifact

        protected java.nio.file.Path processArtifact​(org.apache.maven.artifact.Artifact artifact,
                                                     java.lang.String... artifactTypes)
                                              throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • addArtifactToClasspath

        protected void addArtifactToClasspath​(org.apache.maven.artifact.Artifact artifact)
                                       throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • warnIfWrongMetaInfLayout

        protected void warnIfWrongMetaInfLayout​(java.nio.file.Path jarFilePath,
                                                org.apache.maven.artifact.Artifact artifact)
                                         throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getDependencyScopes

        protected abstract java.util.List<java.lang.String> getDependencyScopes()
      • addDependenciesToClasspath

        protected void addDependenciesToClasspath()
                                           throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getMainBuildPath

        protected java.nio.file.Path getMainBuildPath()
                                               throws org.apache.maven.plugin.MojoExecutionException
        Returns path to where application classes are stored, or jar artifact if it is produced.
        Returns:
        Path to application classes
        Throws:
        org.apache.maven.plugin.MojoExecutionException - failed getting main build path
      • populateApplicationClasspath

        protected void populateApplicationClasspath()
                                             throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • populateClasspath

        protected void populateClasspath()
                                  throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getClasspath

        protected java.lang.String getClasspath()
                                         throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • buildImage

        protected void buildImage()
                           throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • checkRequiredVersionIfNeeded

        protected void checkRequiredVersionIfNeeded()
                                             throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • maybeAddGeneratedResourcesConfig

        protected void maybeAddGeneratedResourcesConfig​(java.util.List<java.lang.String> into)
      • maybeAddReachabilityMetadata

        protected void maybeAddReachabilityMetadata​(java.util.List<java.lang.String> configDirs)