Package org.tentackle.maven.plugin.jlink
Interface ArtifactCreator
-
- All Known Implementing Classes:
DefaultArtifactCreator
public interface ArtifactCreatorModifies, creates and attaches the artifacts to be deployed.
May be replaced via @Serviceannotation 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 Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidattachInstallers(JPackageMojo mojo, long minTime)Attaches the installers created by the jpackage goal.voidcreateAndAttachArtifact(JLinkMojo mojo)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.voidcreateAndAttachArtifact(JPackageMojo mojo, java.io.File appImageDir)Creates and attaches the update ZIP file created by the jpackage goal.
Invoked only if update feature is enabled.static ArtifactCreatorgetInstance()The singleton.voidprocessApplicationImage(JPackageMojo mojo, java.io.File imageDir)Processes the created application image.
-
-
-
Method Detail
-
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, java.io.File imageDir) throws org.apache.maven.plugin.MojoExecutionException
Processes the created application image.- Parameters:
mojo- the jpackage mojoimageDir- 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 mojominTime- the minimum creating time of the artifacts- Throws:
org.apache.maven.plugin.MojoExecutionException- if failed
-
createAndAttachArtifact
void createAndAttachArtifact(JPackageMojo mojo, java.io.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 mojoappImageDir- the application image directory- Throws:
org.apache.maven.plugin.MojoExecutionException- if failed- See Also:
AbstractJLinkMojo.withUpdater
-
-