Package org.moditect.commands
Class CreateRuntimeImage
- java.lang.Object
-
- org.moditect.commands.CreateRuntimeImage
-
public class CreateRuntimeImage extends java.lang.Object
Creates a modular runtime image for the given modules and module path, via jlink.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
bindServices
private java.lang.Integer
compression
private java.util.Set<java.nio.file.Path>
dependencies
private static java.lang.String
DEPENDENCIES_DIRECTORY
private java.util.List<java.lang.String>
excludeResourcesPatterns
private boolean
ignoreSigningInformation
private JarInclusionPolicy
jarInclusionPolicy
private java.lang.String
launcher
private Log
log
private java.util.Set<java.nio.file.Path>
modulePath
private java.util.List<java.lang.String>
modules
private boolean
noHeaderFiles
private boolean
noManPages
private java.nio.file.Path
outputDirectory
private java.nio.file.Path
projectJar
private boolean
stripDebug
-
Constructor Summary
Constructors Constructor Description CreateRuntimeImage(java.util.Set<java.nio.file.Path> modulePath, java.util.List<java.lang.String> modules, JarInclusionPolicy jarInclusionPolicy, java.util.Set<java.nio.file.Path> dependencies, java.nio.file.Path projectJar, java.lang.String launcherName, java.lang.String launcherModule, java.nio.file.Path outputDirectory, java.lang.Integer compression, boolean stripDebug, boolean ignoreSigningInformation, java.util.List<java.lang.String> excludeResourcesPatterns, Log log, boolean noHeaderFiles, boolean noManPages, boolean bindServices)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
copyAppJar(java.nio.file.Path jarDirectory)
private void
copyDependencyJars(java.nio.file.Path jarDirectory)
private void
copyJars()
private void
deleteImageFolder()
private static java.util.List<java.lang.String>
getModules(java.util.List<java.lang.String> modules)
void
run()
private void
runJlink()
-
-
-
Field Detail
-
DEPENDENCIES_DIRECTORY
private static final java.lang.String DEPENDENCIES_DIRECTORY
- See Also:
- Constant Field Values
-
modulePath
private final java.util.Set<java.nio.file.Path> modulePath
-
modules
private final java.util.List<java.lang.String> modules
-
jarInclusionPolicy
private final JarInclusionPolicy jarInclusionPolicy
-
dependencies
private final java.util.Set<java.nio.file.Path> dependencies
-
projectJar
private final java.nio.file.Path projectJar
-
outputDirectory
private final java.nio.file.Path outputDirectory
-
ignoreSigningInformation
private boolean ignoreSigningInformation
-
launcher
private final java.lang.String launcher
-
log
private final Log log
-
compression
private final java.lang.Integer compression
-
stripDebug
private final boolean stripDebug
-
noHeaderFiles
private final boolean noHeaderFiles
-
noManPages
private final boolean noManPages
-
excludeResourcesPatterns
private final java.util.List<java.lang.String> excludeResourcesPatterns
-
bindServices
private final boolean bindServices
-
-
Constructor Detail
-
CreateRuntimeImage
public CreateRuntimeImage(java.util.Set<java.nio.file.Path> modulePath, java.util.List<java.lang.String> modules, JarInclusionPolicy jarInclusionPolicy, java.util.Set<java.nio.file.Path> dependencies, java.nio.file.Path projectJar, java.lang.String launcherName, java.lang.String launcherModule, java.nio.file.Path outputDirectory, java.lang.Integer compression, boolean stripDebug, boolean ignoreSigningInformation, java.util.List<java.lang.String> excludeResourcesPatterns, Log log, boolean noHeaderFiles, boolean noManPages, boolean bindServices)
-
-
Method Detail
-
getModules
private static java.util.List<java.lang.String> getModules(java.util.List<java.lang.String> modules)
-
run
public void run() throws java.io.IOException
- Throws:
java.io.IOException
-
deleteImageFolder
private void deleteImageFolder() throws java.io.IOException
- Throws:
java.io.IOException
-
copyJars
private void copyJars() throws java.io.IOException
- Throws:
java.io.IOException
-
copyAppJar
private void copyAppJar(java.nio.file.Path jarDirectory) throws java.io.IOException
- Throws:
java.io.IOException
-
copyDependencyJars
private void copyDependencyJars(java.nio.file.Path jarDirectory) throws java.io.IOException
- Throws:
java.io.IOException
-
runJlink
private void runJlink() throws java.lang.AssertionError
- Throws:
java.lang.AssertionError
-
-