Interface ModularizeDependenciesTask
- All Superinterfaces:
Task<Set<Dependency>,
ModularizeDependenciesTask>
A task for modularizing the dependencies of the project.
A project can have different kind of module dependencies:
- Modules which define module descriptor.
- Automatic modules which define the
Automatic-Module-Name
entry in theirMANIFEST.MF
and are then named modules. - Unnamed modules which unlike the others can't hardly be used as-is in a fully modular application.
The purpose of the modularize dependencies task is to repackage each automatic and unnamed dependency with a proper module descriptor (i.e. module-info.java
) in order to be able to package
the project in a Jmod, create an optimized runtime and native application delivrable.
After modularization, the module of an unnamed module dependency is named as [GROUP].[NAME]
with [NAME]
being escaped to be a valid Java identifier (i.e. "-"
replaced by
"."
...).
Module descriptors are generated for automatic and unnamed modules, they can be extended by merging ModuleInfo
instances provided with moduleOverrides(java.util.List)
. Complete
module descriptors can also be provided with moduleOverridesPath(java.nio.file.Path)
in which case descriptor generation shall be skipped.
- Since:
- 1.4
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionCreates a jmod build task.default BuildJmodTask
buildJmod
(Consumer<BuildJmodTask> configurer) Creates and configures a jmod build task.debug()
Creates a debug task.default DebugTask
Creates and configures a debug task.moduleOverrides
(List<? extends ModuleInfo> moduleOverrides) Specifies a list of module info to extend the module descriptor generated for automatic and unnamed module dependencies.moduleOverridesPath
(Path moduleOverridesPath) Specifies the path where to find module descritors to use for automatic and unnamed module dependencies instead of trying to generate them.run()
Creates a run task.default RunTask
Creates and configures a run task.start()
Creates a start task.default StartTask
Creates and configures a start task.Methods inherited from interface io.inverno.tool.buildtools.Task
doOnComplete, execute
-
Method Details
-
moduleOverridesPath
Specifies the path where to find module descritors to use for automatic and unnamed module dependencies instead of trying to generate them.
Each overridden
module-info.java
descriptor must be placed in a folder named after the module at the root of the specified path.- Parameters:
moduleOverridesPath
- the path to the module descriptors- Returns:
- the task
-
moduleOverrides
Specifies a list of module info to extend the module descriptor generated for automatic and unnamed module dependencies.
The specified module info will be merged into the generated module descriptor for each
- Parameters:
moduleOverrides
- a list of module info- Returns:
- the task
-
start
StartTask start()Creates a start task.
- Returns:
- a start task
-
start
Creates and configures a start task.
- Parameters:
configurer
- a configurer- Returns:
- a configured start task
-
run
RunTask run()Creates a run task.
- Returns:
- a run task
-
run
Creates and configures a run task.
- Parameters:
configurer
- a configurer- Returns:
- a configured run task
-
debug
DebugTask debug()Creates a debug task.
- Returns:
- a debug task
-
debug
Creates and configures a debug task.
- Parameters:
configurer
- a configurer- Returns:
- a configured debug task
-
buildJmod
BuildJmodTask buildJmod()Creates a jmod build task.
- Returns:
- a jmod build task
-
buildJmod
Creates and configures a jmod build task.
- Parameters:
configurer
- a configurer- Returns:
- a configured jmod build task
-