jlink:jlink
Full name:
com.github.akman:jlink-maven-plugin:0.1.11:jlink
Description:
The main idea is to avoid being tied to project artifacts and allow the user to fully control the process of creating an image. However, it is possible, of course, to customize the process using project artifacts.
Attributes:
- Requires a Maven project to be executed.
- Requires dependency resolution of artifacts in scope:
runtime
. - The goal is not marked as thread-safe and thus does not support parallel builds.
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<addmodules> |
List |
- |
Specifies the modules names (names of root modules) to add to the
runtime image. Their transitive dependencies will add too.
<addmodules> <addmodule>java.base</addmodule> <addmodule>org.example.rootmodule</addmodule> </addmodules> The jlink CLI is: |
<bindservices> |
boolean |
- |
Link service provider modules and their dependencies.
The jlink CLI is: Default value is: false . |
<compress> |
Compress |
- |
Compresses all resources in the output image. Specify compression {
NO_COMPRESSION | CONSTANT_STRING_SHARING | ZIP }. An optional
pattern-list filter can be specified to list the pattern of files
to include.
<compress> <compression>ZIP</compression> <filters> <filter>**/*-info.class</filter> <filter>glob:**/module-info.class</filter> <filter>regex:/java[a-z]+$</filter> <filter>@filename</filter> </filters> </compress> The jlink CLI is:
|
<deduplegalnotices> |
boolean |
- |
De-duplicate all legal notices. If true is specified then it will
be an error if two files of the same filename are different.
The jlink CLI is:
Default value is: false . |
<disableplugins> |
List |
- |
Disables the specified plug-ins. For a complete list of all
available plug-ins, run the command: jlink
--list-plugins
<disableplugins> <disableplugin>compress</disableplugin> <disableplugin>dedup-legal-notices</disableplugin> </disableplugins> The jlink CLI is: |
<endian> |
Endian |
- |
Specifies the byte order of the generated image: { NATIVE | LITTLE
| BIG }.
The jlink CLI is: Default value is: NATIVE . |
<excludefiles> |
List |
- |
Specify files to exclude.
<excludefiles> <excludefile>**/*-info.class</excludefile> <excludefile>glob:**/module-info.class</excludefile> <excludefile>regex:/java[a-z]+$</excludefile> <excludefile>@filename</excludefile> </excludefiles> The jlink CLI is: |
<excludejmodsection> |
Section |
- |
Specify a JMOD section to exclude { MAN | HEADERS }.
The jlink CLI is:
|
<excluderesources> |
List |
- |
Specify resources to exclude.
<excluderesources> <excluderesource>**/*-info.class</excluderesource> <excluderesource>glob:**/module-info.class</excluderesource> <excluderesource>regex:/java[a-z]+$</excluderesource> <excluderesource>@filename</excluderesource> </excluderesources> The jlink CLI is:
|
<generatejliclasses> |
File |
- |
Specify a file listing the java.lang.invoke classes to
pre-generate. By default, this plugin may use a builtin list of
classes to pre-generate. If this plugin runs on a different runtime
version than the image being created then code generation will be
disabled by default to guarantee correctness add
ignore-version=true to override this.
The jlink CLI is:
|
<ignoresigninginformation> |
boolean |
- |
Suppresses a fatal error when signed modular JARs are linked in the
runtime image. The signature-related files of the signed modular
JARs aren't copied to the runtime image.
The jlink CLI is: Default 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.
CAUTION! Ensure that you specified: ‒‒add-modules
jdk.localedata when using this property.
<includelocales> <includelocale>en</includelocale> <includelocale>ja</includelocale> <includelocale>*-IN</includelocale> </includelocales> The jlink CLI is: |
<launcher> |
Launcher |
- |
Specifies the launcher command name for the module (and the main
class).
<launcher> <command>mylauncher</command> <mainmodule>mainModule</mainmodule> <mainclass>mainClass</mainclass> </launcher> The jlink CLI is: |
<libsdir> |
File |
- |
Specifies the location in which non modular dependencies will be
copied. Default value is: ${project.build.directory}/jlink/libs . |
<limitmodules> |
List |
- |
Limits the universe of observable modules to those in the
transitive closure of the named modules, mod, plus the main module,
if any, plus any further modules specified in the "addmodules"
property. It used to limit resolve any services other than the
selected services, if the property "bindservices" set to true.
<limitmodules> <limitmodule>java.base</limitmodule> <limitmodule>org.example.limitmodule</limitmodule> </limitmodules> The jlink CLI is: |
<modsdir> |
File |
- |
Specifies the location in which modular dependencies will be
copied. Default value is: ${project.build.directory}/jlink/mods . |
<modulepath> |
ModulePath |
- |
Specifies the module path. The path where the jlink tool discovers
observable modules: modular JAR files, JMOD files, exploded
modules. If this option is not specified, then the default module
path is $JAVA_HOME/jmods. This directory contains the java.base
module and the other standard and JDK modules. If this option is
specified but the java.base module cannot be resolved from it, then
the jlink command appends $JAVA_HOME/jmods to the module path.
pathelements - passed to jlink as is filesets - sets of files (without directories) dirsets - sets of directories (without files) dependencysets - sets of dependencies with specified includes and excludes patterns (glob: or regex:) for file names and regex patterns only for module names <modulepath> <pathelements> <pathelement>mod.jar</pathelement> <pathelement>mod.jmod</pathelement> <pathelement>mods/exploded/mod</pathelement> </pathelements> <filesets> <fileset> <directory>${project.build.directory}</directory> <includes> <include>**/*</include> </includes> <excludes> <exclude>**/*Empty.jar</exclude> </excludes> <followSymlinks>false</followSymlinks> </fileset> </filesets> <dirsets> <dirset> <directory>target</directory> <includes> <include>**/*</include> </includes> <excludes> <exclude>**/*Test</exclude> </excludes> <followSymlinks>true</followSymlinks> </dirset> </dirsets> <dependencysets> <dependencyset> <includeoutput>false</includeoutput> <excludeautomatic>false</excludeautomatic> <includes> <include>glob:**/*.jar</include> <include>regex:foo-(bar|baz)-.*?\.jar</include> </includes> <includenames> <includename>.*</includename> </includenames> <excludes> <exclude>glob:**/javafx.*Empty</exclude> </excludes> <excludenames> <excludename>javafx\..+Empty</excludename> </excludenames> </dependencyset> </dependencysets> </modulepath> The jlink CLI is: |
<noheaderfiles> |
boolean |
- |
Excludes header files.
The jlink CLI is: Default value is: false . |
<nomanpages> |
boolean |
- |
Excludes man pages.
The jlink CLI is: Default value is: false . |
<orderresources> |
List |
- |
Orders the specified paths in priority order.
<orderresources> <orderresource>**/*-info.class</orderresource> <orderresource>glob:**/module-info.class</orderresource> <orderresource>regex:/java[a-z]+$</orderresource> <orderresource>@filename</orderresource> </orderresources> The jlink CLI is:
|
<output> |
File |
- |
Specifies the location of the generated runtime image.
The jlink CLI is: Default value is: ${project.build.directory}/jlink/image . |
<postprocesspath> |
File |
- |
Post process an existing image.
The jlink CLI is: |
<releaseinfo> |
ReleaseInfo |
- |
Load release properties from the supplied option file. - adds: is
to add properties to the release file. - dels: is to delete the
list of keys in release file. - Any number of key=value pairs can
be passed.
<releaseinfo> <file>file</file> <adds> <key1>value1</key1> <key2>value2</key2> </adds> <dells> <key1 /> <key2 /> </dells> </releaseinfo> The jlink CLI is: --release-info=file|add:key1=value1:key2=value2:...|del:key-list
|
<resourceslastsorter> |
String |
- |
The last plugin allowed to sort resources.
The jlink CLI is: |
<saveopts> |
File |
- |
Save jlink options in the given file.
The jlink CLI is: |
<stripdebug> |
boolean |
- |
Strips debug information from the output image.
The jlink CLI is: Default value is: false . |
<stripjavadebugattributes> |
boolean |
- |
Strip Java debug attributes from classes in the output image.
The jlink CLI is: Default value is: false . |
<stripnativecommands> |
boolean |
- |
Exclude native commands (such as java/java.exe) from the image.
The jlink CLI is: Default value is: false . |
<suggestproviders> |
List |
- |
Suggest providers that implement the given service types from the
module path.
<suggestproviders> <suggestprovider>provider.name</suggestprovider> </suggestproviders> The jlink CLI is: |
<toolhome> |
File |
- |
Specifies the path to the JDK home directory providing the tool
needed. |
<verbose> |
boolean |
- |
Enable verbose tracing.
The jlink CLI is: Default value is: false . |
<vm> |
HotSpot |
- |
Select the HotSpot VM in the output image: { CLIENT | SERVER |
MINIMAL | ALL }.
Default is ALL. The jlink CLI is:
|
Parameter Details
<addmodules>
<addmodules> <addmodule>java.base</addmodule> <addmodule>org.example.rootmodule</addmodule> </addmodules>
The jlink CLI is: --add-modules module [,
module...]
- Type:
java.util.List
- Required:
No
<bindservices>
The jlink CLI is: --bind-services
- Type:
boolean
- Required:
No
- Default:
false
<compress>
<compress> <compression>ZIP</compression> <filters> <filter>**/*-info.class</filter> <filter>glob:**/module-info.class</filter> <filter>regex:/java[a-z]+$</filter> <filter>@filename</filter> </filters> </compress>
The jlink CLI is:
--compress={0|1|2}[:filter=pattern-list]
- Type:
ru.akman.maven.plugins.jlink.Compress
- Required:
No
<deduplegalnotices>
The jlink CLI is:
--dedup-legal-notices=error-if-not-same-content
- Type:
boolean
- Required:
No
- Default:
false
<disableplugins>
jlink
--list-plugins
<disableplugins> <disableplugin>compress</disableplugin> <disableplugin>dedup-legal-notices</disableplugin> </disableplugins>
The jlink CLI is: --disable-plugin pluginname
- Type:
java.util.List
- Required:
No
<endian>
The jlink CLI is: --endian {little|big}
- Type:
ru.akman.maven.plugins.jlink.Endian
- Required:
No
- Default:
NATIVE
<excludefiles>
<excludefiles> <excludefile>**/*-info.class</excludefile> <excludefile>glob:**/module-info.class</excludefile> <excludefile>regex:/java[a-z]+$</excludefile> <excludefile>@filename</excludefile> </excludefiles>
The jlink CLI is: --exclude-files=pattern-list
- Type:
java.util.List
- Required:
No
<excludejmodsection>
The jlink CLI is:
--exclude-jmod-section={man|headers}
- Type:
ru.akman.maven.plugins.jlink.Section
- Required:
No
<excluderesources>
<excluderesources> <excluderesource>**/*-info.class</excluderesource> <excluderesource>glob:**/module-info.class</excluderesource> <excluderesource>regex:/java[a-z]+$</excluderesource> <excluderesource>@filename</excluderesource> </excluderesources>
The jlink CLI is:
--order-resources=pattern-list
- Type:
java.util.List
- Required:
No
<generatejliclasses>
The jlink CLI is:
--generate-jli-classes=@filename
- Type:
java.io.File
- Required:
No
<ignoresigninginformation>
The jlink CLI is: --ignore-signing-information
- Type:
boolean
- Required:
No
- Default:
false
<includelocales>
‒‒add-modules
jdk.localedata
when using this property.
<includelocales> <includelocale>en</includelocale> <includelocale>ja</includelocale> <includelocale>*-IN</includelocale> </includelocales>
The jlink CLI is: --include-locales=langtag[,langtag
...]
- Type:
java.util.List
- Required:
No
<launcher>
<launcher> <command>mylauncher</command> <mainmodule>mainModule</mainmodule> <mainclass>mainClass</mainclass> </launcher>
The jlink CLI is: --launcher
command=main-module[/main-class]
- Type:
ru.akman.maven.plugins.jlink.Launcher
- Required:
No
<libsdir>
- Type:
java.io.File
- Required:
No
- Default:
${project.build.directory}/jlink/libs
<limitmodules>
<limitmodules> <limitmodule>java.base</limitmodule> <limitmodule>org.example.limitmodule</limitmodule> </limitmodules>
The jlink CLI is: --limit-modules module [,
module...]
- Type:
java.util.List
- Required:
No
<modsdir>
- Type:
java.io.File
- Required:
No
- Default:
${project.build.directory}/jlink/mods
<modulepath>
pathelements - passed to jlink as is filesets - sets of files (without directories) dirsets - sets of directories (without files) dependencysets - sets of dependencies with specified includes and excludes patterns (glob: or regex:) for file names and regex patterns only for module names
<modulepath> <pathelements> <pathelement>mod.jar</pathelement> <pathelement>mod.jmod</pathelement> <pathelement>mods/exploded/mod</pathelement> </pathelements> <filesets> <fileset> <directory>${project.build.directory}</directory> <includes> <include>**/*</include> </includes> <excludes> <exclude>**/*Empty.jar</exclude> </excludes> <followSymlinks>false</followSymlinks> </fileset> </filesets> <dirsets> <dirset> <directory>target</directory> <includes> <include>**/*</include> </includes> <excludes> <exclude>**/*Test</exclude> </excludes> <followSymlinks>true</followSymlinks> </dirset> </dirsets> <dependencysets> <dependencyset> <includeoutput>false</includeoutput> <excludeautomatic>false</excludeautomatic> <includes> <include>glob:**/*.jar</include> <include>regex:foo-(bar|baz)-.*?\.jar</include> </includes> <includenames> <includename>.*</includename> </includenames> <excludes> <exclude>glob:**/javafx.*Empty</exclude> </excludes> <excludenames> <excludename>javafx\..+Empty</excludename> </excludenames> </dependencyset> </dependencysets> </modulepath>
The jlink CLI is: --modulepath path
- Type:
ru.akman.maven.plugins.jlink.ModulePath
- Required:
No
<noheaderfiles>
The jlink CLI is: --no-header-files
- Type:
boolean
- Required:
No
- Default:
false
<nomanpages>
The jlink CLI is: --no-man-pages
- Type:
boolean
- Required:
No
- Default:
false
<orderresources>
<orderresources> <orderresource>**/*-info.class</orderresource> <orderresource>glob:**/module-info.class</orderresource> <orderresource>regex:/java[a-z]+$</orderresource> <orderresource>@filename</orderresource> </orderresources>
The jlink CLI is:
--order-resources=pattern-list
- Type:
java.util.List
- Required:
No
<output>
The jlink CLI is: --output path
- Type:
java.io.File
- Required:
No
- Default:
${project.build.directory}/jlink/image
<postprocesspath>
The jlink CLI is: --post-process-path imagefile
- Type:
java.io.File
- Required:
No
<releaseinfo>
<releaseinfo> <file>file</file> <adds> <key1>value1</key1> <key2>value2</key2> </adds> <dells> <key1 /> <key2 /> </dells> </releaseinfo>
The jlink CLI is:
--release-info=file|add:key1=value1:key2=value2:...|del:key-list
- Type:
ru.akman.maven.plugins.jlink.ReleaseInfo
- Required:
No
<resourceslastsorter>
The jlink CLI is: --resources-last-sorter name
- Type:
java.lang.String
- Required:
No
<saveopts>
The jlink CLI is: --save-opts filename
- Type:
java.io.File
- Required:
No
<stripdebug>
The jlink CLI is: --strip-debug
- Type:
boolean
- Required:
No
- Default:
false
<stripjavadebugattributes>
The jlink CLI is: --strip-java-debug-attributes
- Type:
boolean
- Required:
No
- Default:
false
<stripnativecommands>
The jlink CLI is: --strip-native-commands
- Type:
boolean
- Required:
No
- Default:
false
<suggestproviders>
<suggestproviders> <suggestprovider>provider.name</suggestprovider> </suggestproviders>
The jlink CLI is: --suggest-providers [name,
...]
- Type:
java.util.List
- Required:
No
<toolhome>
- Type:
java.io.File
- Required:
No
<verbose>
The jlink CLI is: --verbose
- Type:
boolean
- Required:
No
- Default:
false
<vm>
Default is ALL.
The jlink CLI is:
--vm={client|server|minimal|all}
- Type:
ru.akman.maven.plugins.jlink.HotSpot
- Required:
No