java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.tentackle.maven.AbstractTentackleMojo
org.tentackle.maven.plugin.jlink.AbstractJLinkMojo
org.tentackle.maven.plugin.jlink.InitMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="init", aggregator=true) public class InitMojo extends AbstractJLinkMojo
Initializes the templates.
Copies the default templates to the project's template directory.
  • Constructor Details

    • InitMojo

      public InitMojo()
  • Method Details

    • 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
    • installTemplates

      protected void installTemplates(boolean overwrite) throws org.apache.maven.plugin.MojoExecutionException
      Description copied from class: AbstractJLinkMojo
      Copies the templates to the template directory.
      Specified by:
      installTemplates in class AbstractJLinkMojo
      Parameters:
      overwrite - true if overwrite existing templates, false if install only missing
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if installation failed
    • createJLinkImage

      protected void createJLinkImage(JLinkResolver.Result result) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Description copied from class: AbstractJLinkMojo
      Creates the jlink image.
      Overrides:
      createJLinkImage 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
    • getImageDirectory

      public File getImageDirectory()
      Description copied from class: AbstractJLinkMojo
      Gets the directory created by jlink holding the image.
      Overrides:
      getImageDirectory in class AbstractJLinkMojo
      Returns:
      the image dir, never null
    • generateFiles

      protected void generateFiles(JLinkResolver.Result result) throws org.apache.maven.plugin.MojoExecutionException
      Description copied from class: AbstractJLinkMojo
      Generates additional files such as shell scripts or command files.
      Specified by:
      generateFiles in class AbstractJLinkMojo
      Parameters:
      result - the resolver result
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if generation failed