Package org.tentackle.maven.plugin.jlink
Class JpackageMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.tentackle.maven.AbstractTentackleMojo
-
- org.tentackle.maven.plugin.jlink.AbstractJlinkMojo
-
- org.tentackle.maven.plugin.jlink.JpackageMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="jpackage", requiresDependencyResolution=RUNTIME, defaultPhase=PACKAGE, requiresProject=true) public class JpackageMojo extends AbstractJlinkMojoMojo to create an application installer package.
Still WIP. Will be cont'd when Java 13 RC is out.
-
-
Constructor Summary
Constructors Constructor Description JpackageMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcopyArtifacts(JlinkResolver.Result result)Copies artifacts not already in the created jlink image to module- or classpath.protected voidcreateImage(JlinkResolver.Result result)Creates the application image.voidexecuteImpl()java.io.FilegetApplicationDirectory()Gets the application directory.java.io.FilegetImageDirectory()Gets the directory created by jpackage holding the image.voidprepareExecute()protected booleanvalidate()-
Methods inherited from class org.tentackle.maven.plugin.jlink.AbstractJlinkMojo
getAddModules, getExcludeModules, getJdepsTool, getLocationManager, getMainClass, getMainModule, getNameTemplate, getProjectHelper, getRunTemplate, getTemplateDir, getUpdateTemplate, installTemplates, isClasspathDependency
-
Methods inherited from class org.tentackle.maven.AbstractTentackleMojo
determineEncoding, determineVerbosity, execute, findResourceDirs, finishExecute, getCanonicalPath, getMavenProject, getMavenSession, getPathRelativeToBasedir, getResourceDirName, getSettings, getSettingsDecrypter, getToolChain, getToolchainManager, getToolFinder, loadResourceFileIntoString
-
-
-
-
Method Detail
-
getImageDirectory
public java.io.File getImageDirectory()
Gets the directory created by jpackage holding the image.- Specified by:
getImageDirectoryin classAbstractJlinkMojo- Returns:
- the image dir, never null
-
getApplicationDirectory
public java.io.File getApplicationDirectory()
Description copied from class:AbstractJlinkMojoGets the application directory.- Overrides:
getApplicationDirectoryin classAbstractJlinkMojo- Returns:
- the destination base directory for the application
-
prepareExecute
public void prepareExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Overrides:
prepareExecutein classAbstractJlinkMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
executeImpl
public void executeImpl() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Overrides:
executeImplin classAbstractJlinkMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
createImage
protected void createImage(JlinkResolver.Result result) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
Creates the application image.- Specified by:
createImagein classAbstractJlinkMojo- Parameters:
result- the resolver info- Throws:
org.apache.maven.plugin.MojoExecutionException- if building the JPMS info failedorg.apache.maven.plugin.MojoFailureException- if jlink returned an error code
-
copyArtifacts
protected void copyArtifacts(JlinkResolver.Result result) throws org.apache.maven.plugin.MojoExecutionException
Description copied from class:AbstractJlinkMojoCopies artifacts not already in the created jlink image to module- or classpath.- Overrides:
copyArtifactsin classAbstractJlinkMojo- Parameters:
result- the resolver info- Throws:
org.apache.maven.plugin.MojoExecutionException- if copy failed
-
validate
protected boolean validate() throws org.apache.maven.plugin.MojoExecutionException- Overrides:
validatein classAbstractJlinkMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-