Package org.apache.maven.plugins.jlink
Class AbstractJLinkMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.jlink.AbstractJLinkMojo
-
- All Implemented Interfaces:
ContextEnabled
,Mojo
- Direct Known Subclasses:
JLinkMojo
public abstract class AbstractJLinkMojo extends AbstractMojo
- Author:
- Karl Heinz Marbaise khmarbaise@apache.org
-
-
Constructor Summary
Constructors Constructor Description AbstractJLinkMojo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringBuilder
convertSeparatedModulePathToPlatformSeparatedModulePath(String pluginModulePath)
This will convert a module path separated by either:
or;
into a string which uses the platform depend path separator uniformly.protected File
getArchiveFile(File basedir, String finalName, String classifier, String archiveExt)
Returns the archive file to generate, based on an optional classifier.protected abstract String
getClassifier()
Overload this to produce a zip with another classifier, for example a jlink-zip.protected String
getCommaSeparatedList(Collection<String> modules)
Convert a list into aprotected org.apache.maven.plugins.jlink.JLinkExecutor
getJlinkExecutor()
protected String
getPlatformDependSeparateList(Collection<String> modulePaths)
Convert a list into a string which is separated by platform depend path separator.protected MavenProject
getProject()
protected MavenSession
getSession()
protected Optional<Toolchain>
getToolchain()
protected boolean
hasClassifier(String classifier)
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Method Detail
-
getClassifier
protected abstract String getClassifier()
Overload this to produce a zip with another classifier, for example a jlink-zip.- Returns:
- get the classifier.
-
getJlinkExecutor
protected org.apache.maven.plugins.jlink.JLinkExecutor getJlinkExecutor()
-
getProject
protected MavenProject getProject()
-
getSession
protected MavenSession getSession()
-
getArchiveFile
protected File getArchiveFile(File basedir, String finalName, String classifier, String archiveExt)
Returns the archive file to generate, based on an optional classifier.- Parameters:
basedir
- the output directoryfinalName
- the name of the ear fileclassifier
- an optional classifierarchiveExt
- The extension of the file.- Returns:
- the file to generate
-
hasClassifier
protected boolean hasClassifier(String classifier)
-
convertSeparatedModulePathToPlatformSeparatedModulePath
protected StringBuilder convertSeparatedModulePathToPlatformSeparatedModulePath(String pluginModulePath)
This will convert a module path separated by either:
or;
into a string which uses the platform depend path separator uniformly.- Parameters:
pluginModulePath
- The module path.- Returns:
- The platform separated module path.
-
getPlatformDependSeparateList
protected String getPlatformDependSeparateList(Collection<String> modulePaths)
Convert a list into a string which is separated by platform depend path separator.- Parameters:
modulePaths
- The list of elements.- Returns:
- The string which contains the elements separated by
File.pathSeparatorChar
.
-
getCommaSeparatedList
protected String getCommaSeparatedList(Collection<String> modules)
Convert a list into a- Parameters:
modules
- The list of modules.- Returns:
- The string with the module list which is separated by
,
.
-
-