Package org.tentackle.maven.plugin.jlink
Class InitMojo
- 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", inheritByDefault=false, aggregator=true) public class InitMojo extends AbstractJlinkMojoInitializes the templates.
Copies the default templates to the configured templateDir.
Needs to be executed only to restore the templates to their defaults.
-
-
Constructor Summary
Constructors Constructor Description InitMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateImage(JlinkResolver.Result result)Creates the application image.voidexecuteImpl()java.io.FilegetImageDirectory()Gets the directory created by jlink holding the image.-
Methods inherited from class org.tentackle.maven.plugin.jlink.AbstractJlinkMojo
copyArtifacts, getAddModules, getApplicationDirectory, getExcludeModules, getJdepsTool, getLocationManager, getMainClass, getMainModule, getNameTemplate, getProjectHelper, getRunTemplate, getTemplateDir, getUpdateTemplate, installTemplates, isClasspathDependency, prepareExecute, validate
-
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()
Description copied from class:AbstractJlinkMojoGets the directory created by jlink holding the image.- Specified by:
getImageDirectoryin classAbstractJlinkMojo- Returns:
- the image dir, never null
-
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
Description copied from class:AbstractJlinkMojoCreates 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
-
-