Interface ArtifactCreator

All Known Implementing Classes:
DefaultArtifactCreator

public interface ArtifactCreator
Modifies, creates and attaches the artifacts to be deployed.
May be replaced via @Service annotation from within an application-specific plugin dependency. For example, to further modify the files or create a bunch of artifacts with different configurations.

Example:

   @Service(ArtifactCreator.class)
   public class SpecialArtifactCreator implements ArtifactCreator {

     @Override
     public void createAndAttachArtifact(JlinkMojo mojo) throws MojoExecutionException {
       ...
     }
   }
 
Add as plugin dependency:
   <plugin>
     <groupId>org.tentackle</groupId>
     <artifactId>tentackle-jlink-maven-plugin</artifactId>
     <dependencies>
       <dependency>
         <groupId>com.example</groupId>
         <artifactId>special-creator</artifactId>
         <version>1.0</version>
       </dependency>
     </dependencies>
     <configuration>
       ...
     </configuration>
   </plugin>
 
  • Method Details

    • getInstance

      static ArtifactCreator getInstance()
      The singleton.
      Returns:
      the singleton
    • createAndAttachArtifact

      void createAndAttachArtifact(JLinkMojo mojo) throws org.apache.maven.plugin.MojoExecutionException
      Creates and attaches the ZIP file created by the jlink goal.
      This also provides the option to modify the created jlink directory before zipping it.
      Parameters:
      mojo - the jlink mojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if failed
    • processApplicationImage

      void processApplicationImage(JPackageMojo mojo, File imageDir) throws org.apache.maven.plugin.MojoExecutionException
      Processes the created application image.
      Parameters:
      mojo - the jpackage mojo
      imageDir - the directory of the application image created by the jpackage tool
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if failed
    • attachInstallers

      void attachInstallers(JPackageMojo mojo, long minTime) throws org.apache.maven.plugin.MojoExecutionException
      Attaches the installers created by the jpackage goal.
      Parameters:
      mojo - the jpackage mojo
      minTime - the minimum creating time of the artifacts
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if failed
    • createAndAttachArtifact

      void createAndAttachArtifact(JPackageMojo mojo, File appImageDir) throws org.apache.maven.plugin.MojoExecutionException
      Creates and attaches the update ZIP file created by the jpackage goal.
      Invoked only if update feature is enabled.
      Parameters:
      mojo - the jpackage mojo
      appImageDir - the application image directory
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if failed
      See Also:
      • AbstractJLinkMojo.withUpdater