Class InitMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="init",
          inheritByDefault=false,
          aggregator=true)
    public class InitMojo
    extends AbstractJlinkMojo
    Initializes the templates.
    Copies the default templates to the configured templateDir.
    Needs to be executed only to restore the templates to their defaults.
    • Constructor Detail

      • InitMojo

        public InitMojo()
    • Method Detail

      • getImageDirectory

        public java.io.File getImageDirectory()
        Description copied from class: AbstractJlinkMojo
        Gets the directory created by jlink holding the image.
        Specified by:
        getImageDirectory in class AbstractJlinkMojo
        Returns:
        the image dir, never null
      • executeImpl

        public void executeImpl()
                         throws org.apache.maven.plugin.MojoExecutionException,
                                org.apache.maven.plugin.MojoFailureException
        Overrides:
        executeImpl in class AbstractJlinkMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • createImage

        protected void createImage​(JlinkResolver.Result result)
                            throws org.apache.maven.plugin.MojoExecutionException,
                                   org.apache.maven.plugin.MojoFailureException
        Description copied from class: AbstractJlinkMojo
        Creates the application image.
        Specified by:
        createImage in class AbstractJlinkMojo
        Parameters:
        result - the resolver info
        Throws:
        org.apache.maven.plugin.MojoExecutionException - if building the JPMS info failed
        org.apache.maven.plugin.MojoFailureException - if jlink returned an error code