Package org.tentackle.maven.plugin.jlink
Interface ArtifactCreator
- All Known Implementing Classes:
DefaultArtifactCreator
public interface ArtifactCreator
Modifies, creates and attaches the artifacts to be deployed.
May be replaced via @
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 Summary
Modifier and TypeMethodDescriptionvoidattachInstallers(JPackageMojo mojo, long minTime) Attaches the installers created by the jpackage goal.voidCreates 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, File appImageDir) Creates and attaches the update ZIP file created by the jpackage goal.
Invoked only if update feature is enabled.static ArtifactCreatorThe singleton.voidprocessApplicationImage(JPackageMojo mojo, File imageDir) Processes the created application image.
-
Method Details
-
getInstance
The singleton.- Returns:
- the singleton
-
createAndAttachArtifact
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 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, 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:
-