Package org.tentackle.maven.plugin.jlink
Class JLinkResolver.Result
- java.lang.Object
-
- org.tentackle.maven.plugin.jlink.JLinkResolver.Result
-
- Enclosing class:
- JLinkResolver
public class JLinkResolver.Result extends java.lang.ObjectHolds the resolver results.
-
-
Constructor Summary
Constructors Constructor Description Result()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToClasspath(java.lang.String element)Adds additional elements to the classpath.
Such as the conf directory.java.lang.StringgenerateClassPath()Generates the class path option to be passed to bin/java.voidgenerateJlinkModulePath(org.tentackle.common.ToolRunner jlinkRunner)Generates the module-path option to be passed to jlink.voidgenerateJlinkModules(org.tentackle.common.ToolRunner jlinkRunner)Generates the module names option passed to jlink.java.lang.StringgenerateModulePath()Generates the module path option to be passed to bin/java.java.util.List<org.apache.maven.artifact.Artifact>getClassPath()Gets the artifacts to add to the class path explicitly.java.util.List<java.lang.String>getExtraClassPathElements()Gets the additional elements added to the classpath.java.lang.StringgetImagePathPrefix()Gets the prefix to the runtime image path.java.util.List<ModularArtifact>getJlinkModules()Gets the modules to be passed to jlink.ModularArtifactgetModuleArtifact(java.lang.String moduleName)Gets a modular artifact by its name.java.util.List<ModularArtifact>getModulePath()Gets the modules to add to the module path explicitly.booleanisClassPathRequired()Returns whether the class path is not empty.booleanisModular()Returns whether this is a modular application.booleanisModulePathRequired()Returns whether the module path is not empty.booleanisPlainModular()Returns whether this is a plain modular application.
Plain modular means that all requirements are met by real modules.java.lang.StringtoString()
-
-
-
Method Detail
-
getImagePathPrefix
public java.lang.String getImagePathPrefix()
Gets the prefix to the runtime image path.- Returns:
- the path, empty if jlink image, else path to runtime image
-
getJlinkModules
public java.util.List<ModularArtifact> getJlinkModules()
Gets the modules to be passed to jlink.- Returns:
- the modules
-
getModulePath
public java.util.List<ModularArtifact> getModulePath()
Gets the modules to add to the module path explicitly.- Returns:
- the modules not passed to jlink
-
getClassPath
public java.util.List<org.apache.maven.artifact.Artifact> getClassPath()
Gets the artifacts to add to the class path explicitly.- Returns:
- the class path
-
isModular
public boolean isModular()
Returns whether this is a modular application.- Returns:
- true if modular
- See Also:
isPlainModular()
-
isPlainModular
public boolean isPlainModular()
Returns whether this is a plain modular application.
Plain modular means that all requirements are met by real modules. If not plain, the jlink tool is used to build a runtime image only and the application modules are placed on the module-path explicitly.- Returns:
- true if plain modular, else mixed modular or classpath application
- See Also:
isModular()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
addToClasspath
public void addToClasspath(java.lang.String element)
Adds additional elements to the classpath.
Such as the conf directory.- Parameters:
element- the classpath element to add
-
getExtraClassPathElements
public java.util.List<java.lang.String> getExtraClassPathElements()
Gets the additional elements added to the classpath.- Returns:
- the extra classpath elements
-
generateJlinkModulePath
public void generateJlinkModulePath(org.tentackle.common.ToolRunner jlinkRunner)
Generates the module-path option to be passed to jlink.- Parameters:
jlinkRunner- the jlink tool runner
-
generateJlinkModules
public void generateJlinkModules(org.tentackle.common.ToolRunner jlinkRunner)
Generates the module names option passed to jlink.- Parameters:
jlinkRunner- the jlink tool runner
-
isModulePathRequired
public boolean isModulePathRequired()
Returns whether the module path is not empty.- Returns:
- true if modulepath must be configured
-
generateModulePath
public java.lang.String generateModulePath()
Generates the module path option to be passed to bin/java.- Returns:
- the option, empty if no extra module path
-
getModuleArtifact
public ModularArtifact getModuleArtifact(java.lang.String moduleName)
Gets a modular artifact by its name.- Parameters:
moduleName- the module name- Returns:
- the artifact, null if no such artifact
-
isClassPathRequired
public boolean isClassPathRequired()
Returns whether the class path is not empty.- Returns:
- true if classpath must be configured
-
generateClassPath
public java.lang.String generateClassPath()
Generates the class path option to be passed to bin/java.- Returns:
- the option, empty if no extra class path
-
-