jlink:jlink

Full name:

org.apache.maven.plugins:maven-jlink-plugin:3.0.0-alpha-1:jlink

Description:

The JLink goal is intended to create a Java Run Time Image file based on http://openjdk.java.net/jeps/282, http://openjdk.java.net/jeps/220.

Attributes:

  • Requires a Maven project to be executed.
  • 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 pom.xml file can look like this:

<addModules>
  <addModule>mod1</addModule>
  <addModule>first</addModule>
  .
  .
</addModules>
The command line equivalent for jlink is: --add-modules <mod>[,<mod>...].
bindServices boolean - Add the option --bind-services or not.
Default value is: false.
compression 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-information
Default value is: false.
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
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>
This configuration is the equivalent of the command line option: --limit-modules <mod>[,<mod>...]
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-files
Default 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-pages
Default 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>
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>
The jlink command linke equivalent: --suggest-providers [<name>,...]
verbose boolean - This will turn on verbose mode. The jlink command line equivalent is: --verbose
Default 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>
The command line equivalent for jlink is: --add-modules <mod>[,<mod>...].
  • Type: java.util.List
  • Required: No

bindServices:

Add the option --bind-services or not.
  • Type: boolean
  • Required: No
  • Default: false

compression:

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.
  • Type: java.lang.Integer
  • Required: No

disablePlugin:

You can disable a plugin by using this option. --disable-plugin pluginName.
  • Type: java.lang.String
  • Required: No

endian:

The byte order of the generated Java Run Time image. --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

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

limitModules:

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>
This configuration is the equivalent of the command line option: --limit-modules <mod>[,<mod>...]
  • Type: java.util.List
  • Required: No

noHeaderFiles:

This will suppress to have an 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:

This will suppress to have the 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:

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>
  • Type: java.lang.String
  • Required: No

stripDebug:

This is intended to strip debug information out. The command line equivalent of jlink is: -G, --strip-debug strip debug information.
  • Type: boolean
  • Required: No
  • Default: false

suggestProviders:

Suggest providers that implement the given service types from the module path.
<suggestProviders>
  <suggestProvider>name-a</suggestProvider>
  <suggestProvider>name-b</suggestProvider>
  .
  .
</suggestProviders>
The jlink command linke equivalent: --suggest-providers [<name>,...]
  • Type: java.util.List
  • Required: No

verbose:

This will turn on verbose mode. The jlink command line equivalent is: --verbose
  • Type: boolean
  • Required: No
  • Default: false