Class CreateRuntimeImageMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.moditect.mavenplugin.image.CreateRuntimeImageMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="create-runtime-image", defaultPhase=PACKAGE, requiresDependencyResolution=COMPILE_PLUS_RUNTIME) public class CreateRuntimeImageMojo extends org.apache.maven.plugin.AbstractMojo
  • Field Details

    • project

      @Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
    • toolchainManager

      @Component private org.apache.maven.toolchain.ToolchainManager toolchainManager
    • mavenSession

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

      @Parameter private String baseJdk
    • modulePath

      @Parameter(defaultValue="[]") private List<File> modulePath
    • outputDirectory

      @Parameter(property="outputDirectory", defaultValue="${project.build.directory}/image") private File outputDirectory
    • modules

      @Parameter(required=true) private List<String> modules
    • jarInclusionPolicy

      @Parameter private JarInclusionPolicy jarInclusionPolicy
    • launcher

      @Parameter private Launcher launcher
    • compression

      @Parameter private Integer compression
    • stripDebug

      @Parameter(defaultValue="false") private boolean stripDebug
    • excludedResources

      @Parameter List<String> excludedResources
    • ignoreSigningInformation

      @Parameter(property="ignoreSigningInformation", defaultValue="false") private boolean ignoreSigningInformation
    • noHeaderFiles

      @Parameter(defaultValue="false") private boolean noHeaderFiles
    • noManPages

      @Parameter(defaultValue="false") private boolean noManPages
    • bindServices

      @Parameter(defaultValue="false") private boolean bindServices
  • Constructor Details

    • CreateRuntimeImageMojo

      public CreateRuntimeImageMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getJModsDir

      private Path getJModsDir() throws org.apache.maven.plugin.MojoExecutionException
      Returns the directory with the jmod files to be used for creating the image. If baseJdk has been given, the jmod files from the JDK identified that way will be used; otherwise the jmod files from the JDK running the current build will be used.
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getToolChainRequirements

      private Map<String,String> getToolChainRequirements(String baseJdk) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getExcludeResourcesPatterns

      private List<String> getExcludeResourcesPatterns()