jlink:jlink
Full name:
org.apache.maven.plugins:maven-jlink-plugin:3.1.0:jlink
Description:
Attributes:
- Requires a Maven project to be executed.
- Requires dependency resolution of artifacts in scope:
runtime. - Binds by default to the lifecycle phase:
package.
Optional Parameters
| Name | Type | Since | Description |
|---|---|---|---|
<addModules> |
List |
- |
Usually this is not necessary, cause this is handled automatically by the given dependencies. By using the --add-modules you can define the root modules to be
resolved. The configuration in <addModules> <addModule>mod1</addModule> <addModule>first</addModule> . . </addModules> --add-modules
<mod>[,<mod>...]. |
<addOptions> |
List |
- |
These JVM arguments will be appended to the
lib/modules file.This parameter requires at least JDK 14. The command line equivalent is: Example:
<addOptions>
<addOption>-Xmx256m</addOption>
<addOption>--enable-preview</addOption>
<addOption>-Dvar=value</addOption>
</addOptions>
Above example will result in |
<bindServices> |
boolean |
- |
Add the option --bind-services or not.Default value is: false. |
<classifier> |
String |
- |
Classifier to add to the artifact generated. If given, the artifact
will be attached as a supplemental artifact. If not given this will
create the main artifact which is the default behavior. If you try
to do that a second time without using a classifier the build will
fail. |
<compress> |
Integer |
- |
Here you can define the compression of the resources being used.
The command line equivalent is: -c,
--compress=level>. The valid values for the level are:
0, 1, 2. |
<disablePlugin> |
String |
- |
You can disable a plugin by using this option.
--disable-plugin pluginName. |
<endian> |
String |
- |
The byte order of the generated Java Run Time image. --endian
<little|big>. If the endian is not given the default
is: native. |
<ignoreSigningInformation> |
boolean |
- |
--ignore-signing-informationDefault value is: false. |
<includeLocales> |
List |
- |
Includes the list of locales where langtag is a BCP 47 language
tag.
This option supports locale matching as defined in RFC 4647. Ensure that you add the module jdk.localedata when using this option. The command line equivalent is:
<includeLocales> <includeLocale>en</includeLocale> <includeLocale>ja</includeLocale> <includeLocale>*-IN</includeLocale> . . </includeLocales> |
<jdkToolchain> |
Map |
- |
Specify the requirements for this jdk toolchain. This overrules the toolchain selected by the maven-toolchain-plugin. note: requires at least Maven 3.3.1 |
<launcher> |
String |
- |
Should the plugin generate a launcher script by means of jlink? The
command line equivalent is: --launcher
<name>=<module>[/<mainclass>]. The valid
values for the level are:
<name>=<module>[/<mainclass>]. |
<limitModules> |
List |
- |
Limit the universe of observable modules. The following gives an
example of the configuration which can be used in the
pom.xml file.
<limitModules>
<limitModule>mod1</limitModule>
<limitModule>xyz</limitModule>
.
.
</limitModules>
--limit-modules <mod>[,<mod>...] |
<modulePaths> |
List |
- |
Include additional paths on the --module-path option.
Project dependencies and JDK modules are automatically added. |
<noHeaderFiles> |
boolean |
- |
This will suppress to have an includes directory in
the resulting Java Run Time Image. The JLink command line
equivalent is: --no-header-filesDefault value is: false. |
<noManPages> |
boolean |
- |
This will suppress to have the man directory in the
resulting Java Run Time Image. The JLink command line equivalent
is: --no-man-pagesDefault value is: false. |
<pluginModulePath> |
String |
- |
Define the plugin module path to be used. There can be defined
multiple entries separated by either ; or
:. The jlink command line equivalent is:
--plugin-module-path <modulepath> |
<sourceJdkModules> |
File |
- |
Set the JDK location to create a Java custom runtime image. |
<stripDebug> |
boolean |
- |
This is intended to strip debug information out. The command line
equivalent of jlink is: -G, --strip-debug
strip debug information.Default value is: false. |
<suggestProviders> |
List |
- |
Suggest providers that implement the given service types from the
module path.
<suggestProviders> <suggestProvider>name-a</suggestProvider> <suggestProvider>name-b</suggestProvider> . . </suggestProviders> --suggest-providers
[<name>,...] |
<verbose> |
boolean |
- |
This will turn on verbose mode. The jlink command line equivalent
is: --verboseDefault value is: false. |
Parameter Details
<addModules>
Usually this is not necessary, cause this is handled automatically by the given dependencies.
By using the --add-modules you can define the root modules to be
resolved. The configuration in pom.xml file can look
like this:
<addModules> <addModule>mod1</addModule> <addModule>first</addModule> . . </addModules>
--add-modules
<mod>[,<mod>...].- Type:
java.util.List - Required:
No
<addOptions>
lib/modules file.This parameter requires at least JDK 14.
The command line equivalent is: jlink
--add-options="...".
Example:
<addOptions>
<addOption>-Xmx256m</addOption>
<addOption>--enable-preview</addOption>
<addOption>-Dvar=value</addOption>
</addOptions>
Above example will result in jlink
--add-options="-Xmx256m" --enable-preview -Dvar=value".
- Type:
java.util.List - Required:
No
<bindServices>
--bind-services or not.- Type:
boolean - Required:
No - Default:
false
<classifier>
- Type:
java.lang.String - Required:
No
<compress>
-c,
--compress=level>. The valid values for the level are:
0, 1, 2.- Type:
java.lang.Integer - Required:
No
<disablePlugin>
--disable-plugin pluginName.- Type:
java.lang.String - Required:
No
<endian>
--endian
<little|big>. If the endian is not given the default
is: native.- Type:
java.lang.String - Required:
No
<ignoreSigningInformation>
--ignore-signing-information- Type:
boolean - Required:
No - Default:
false
<includeLocales>
This option supports locale matching as defined in RFC 4647. Ensure that you add the module jdk.localedata when using this option.
The command line equivalent is:
--include-locales=en,ja,*-IN.
<includeLocales> <includeLocale>en</includeLocale> <includeLocale>ja</includeLocale> <includeLocale>*-IN</includeLocale> . . </includeLocales>
- Type:
java.util.List - Required:
No
<jdkToolchain>
Specify the requirements for this jdk toolchain. This overrules the toolchain selected by the maven-toolchain-plugin.
note: requires at least Maven 3.3.1- Type:
java.util.Map - Required:
No
<launcher>
--launcher
<name>=<module>[/<mainclass>]. The valid
values for the level are:
<name>=<module>[/<mainclass>].- Type:
java.lang.String - Required:
No
<limitModules>
pom.xml file.
<limitModules>
<limitModule>mod1</limitModule>
<limitModule>xyz</limitModule>
.
.
</limitModules>
--limit-modules <mod>[,<mod>...]- Type:
java.util.List - Required:
No
<modulePaths>
--module-path option.
Project dependencies and JDK modules are automatically added.- Type:
java.util.List - Required:
No
<noHeaderFiles>
includes directory in
the resulting Java Run Time Image. The JLink command line
equivalent is: --no-header-files- Type:
boolean - Required:
No - Default:
false
<noManPages>
man directory in the
resulting Java Run Time Image. The JLink command line equivalent
is: --no-man-pages- Type:
boolean - Required:
No - Default:
false
<pluginModulePath>
; or
:. The jlink command line equivalent is:
--plugin-module-path <modulepath>- Type:
java.lang.String - Required:
No
<sourceJdkModules>
- Type:
java.io.File - Required:
No
<stripDebug>
jlink is: -G, --strip-debug
strip debug information.- Type:
boolean - Required:
No - Default:
false
<suggestProviders>
<suggestProviders> <suggestProvider>name-a</suggestProvider> <suggestProvider>name-b</suggestProvider> . . </suggestProviders>
--suggest-providers
[<name>,...]- Type:
java.util.List - Required:
No
<verbose>
--verbose- Type:
boolean - Required:
No - Default:
false


