Class JPackToolPrepareMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
net.agilhard.maven.plugins.jpacktool.base.mojo.AbstractToolMojo
net.agilhard.maven.plugins.jpacktool.base.mojo.AbstractDependencyJarsMojo<GenerateJDepsHandler>
net.agilhard.maven.plugins.jpacktool.base.mojo.JPackToolPrepareMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="jpacktool-prepare", requiresDependencyResolution=RUNTIME, defaultPhase=PREPARE_PACKAGE, requiresProject=true) public class JPackToolPrepareMojo extends AbstractDependencyJarsMojo<GenerateJDepsHandler>
Prepare execution of the jlink and jpackager goals by analyzing java module dependencies and copying files.
- Author:
- Bernd Eilers
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
finalName
Name of the generated properties file in thetarget
directory.protected GenerateClassPathHandler
genClassPathHandler
protected boolean
generateAutomaticJdeps
protected boolean
generateClassPathJdeps
protected boolean
generateModuleJdeps
protected boolean
ignoreMissingDeps
Flag if --ignore-missing-deps should be used on the jdeps calls to analyze module dependenciesprotected java.util.Map<java.lang.String,java.lang.Object>
model
protected boolean
showAllDeps
protected boolean
skipCopy
protected boolean
skipJDeps
protected boolean
useListDeps
Fields inherited from class net.agilhard.maven.plugins.jpacktool.base.mojo.AbstractDependencyJarsMojo
dependencyGraphBuilder, handler
Fields inherited from class net.agilhard.maven.plugins.jpacktool.base.mojo.AbstractToolMojo
buildDirectory, classpathArtifacts, excludedArtifacts, javaVersion, jdkToolchain, jpacktoolModel, jpacktoolPropertyPrefix, locationManager, mavenProjectHelper, outputDirectoryAutomaticJars, outputDirectoryClasspathJars, outputDirectoryJPacktool, outputDirectoryModules, project, session, shouldSkipReason, skip, systemModules, templateMap, toolchainManager, verbose, zipArchiver
-
Constructor Summary
Constructors Constructor Description JPackToolPrepareMojo()
-
Method Summary
Modifier and Type Method Description CollectJarsHandler
createCopyHandler()
GenerateJDepsHandler
createHandler()
GenerateClassPathHandler
creatGenClassPathHandler()
void
executeAfterJDeps()
Hook for derived classes to execute something after the JDeps Handler has finished.void
executeBeforeCopy()
Hook for derived classes to execute something before has CollectJarsHandler is being called.void
executeToolMain()
boolean
isSkipCopy()
boolean
isSkipJDeps()
protected void
putModel(java.lang.String key, java.lang.Object value)
void
setSkipCopy(boolean skipCopy)
void
setSkipJDeps(boolean skipJDeps)
Methods inherited from class net.agilhard.maven.plugins.jpacktool.base.mojo.AbstractDependencyJarsMojo
getDependencyGraphBuilder, getHandler
Methods inherited from class net.agilhard.maven.plugins.jpacktool.base.mojo.AbstractToolMojo
bytesToHex, checkShouldSkip, createZipArchiveFromDirectory, execute, executeCommand, executeToolFinish, executeToolStart, getArtifactFile, getClasspathArtifacts, getExcludedArtifacts, getFinalName, getJavaVersion, getJdkToolchain, getJpacktoolPropertyPrefix, getLocationManager, getOutputDirectoryAutomaticJars, getOutputDirectoryClasspathJars, getOutputDirectoryJPacktool, getOutputDirectoryModules, getPluginVersion, getProject, getSession, getShouldSkipReason, getSystemModules, getToolchain, getToolchainManager, getToolExecutable, hasClassifier, isVerbose, publishJPacktoolProperties, publishSHA256, setShouldSkipReason
-
Field Details
-
generateAutomaticJdeps
@Parameter(defaultValue="true", required=true, readonly=false) protected boolean generateAutomaticJdeps -
generateClassPathJdeps
@Parameter(defaultValue="true", required=true, readonly=false) protected boolean generateClassPathJdeps -
generateModuleJdeps
@Parameter(defaultValue="true", required=true, readonly=false) protected boolean generateModuleJdeps -
showAllDeps
@Parameter(defaultValue="false", required=true, readonly=false) protected boolean showAllDeps -
ignoreMissingDeps
@Parameter(defaultValue="true") protected boolean ignoreMissingDepsFlag if --ignore-missing-deps should be used on the jdeps calls to analyze module dependencies -
useListDeps
@Parameter(defaultValue="false") protected boolean useListDeps -
skipJDeps
protected boolean skipJDeps -
skipCopy
protected boolean skipCopy -
finalName
@Parameter(defaultValue="${project.build.finalName}", readonly=true) protected java.lang.String finalNameName of the generated properties file in thetarget
directory. This will not change the name of the installed/deployed file. -
model
protected java.util.Map<java.lang.String,java.lang.Object> model -
genClassPathHandler
-
-
Constructor Details
-
JPackToolPrepareMojo
public JPackToolPrepareMojo()
-
-
Method Details
-
putModel
protected void putModel(java.lang.String key, java.lang.Object value) -
executeBeforeCopy
public void executeBeforeCopy() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionHook for derived classes to execute something before has CollectJarsHandler is being called.- Throws:
org.apache.maven.plugin.MojoExecutionException
- on plugin execution failureorg.apache.maven.plugin.MojoFailureException
- on misc plugin failure
-
executeAfterJDeps
public void executeAfterJDeps() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionHook for derived classes to execute something after the JDeps Handler has finished.- Throws:
org.apache.maven.plugin.MojoExecutionException
- on plugin errororg.apache.maven.plugin.MojoFailureException
- on plugin error
-
executeToolMain
public void executeToolMain() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Overrides:
executeToolMain
in classAbstractDependencyJarsMojo<GenerateJDepsHandler>
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
isSkipJDeps
public boolean isSkipJDeps() -
setSkipJDeps
public void setSkipJDeps(boolean skipJDeps) -
isSkipCopy
public boolean isSkipCopy() -
setSkipCopy
public void setSkipCopy(boolean skipCopy) -
creatGenClassPathHandler
-
createCopyHandler
-
createHandler
public GenerateJDepsHandler createHandler() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
createHandler
in classAbstractDependencyJarsMojo<GenerateJDepsHandler>
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-