Class Jmod

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.modules.Jmod
All Implemented Interfaces:
Cloneable

public class Jmod extends Task
Creates a linkable .jmod file from a modular jar file, and optionally from other resource files such as native libraries and documents. Equivalent to the JDK's jmod tool.

Supported attributes:

destFile
Required, jmod file to create.
classpath
classpathref
Where to locate files to be placed in the jmod file.
modulepath
modulepathref
Where to locate dependencies.
commandpath
commandpathref
Directories containing native commands to include in jmod.
headerpath
headerpathref
Directories containing header files to include in jmod.
configpath
configpathref
Directories containing user-editable configuration files to include in jmod.
legalpath
legalpathref
Directories containing legal licenses and notices to include in jmod.
nativelibpath
nativelibpathref
Directories containing native libraries to include in jmod.
manpath
manpathref
Directories containing man pages to include in jmod.
version
Module version.
mainclass
Main class of module.
platform
The target platform for the jmod. A particular JDK's platform can be seen by running jmod describe $JDK_HOME/jmods/java.base.jmod | grep -i platform.
hashModulesPattern
Regular expression for names of modules in the module path which depend on the jmod being created, and which should have hashes generated for them and included in the new jmod.
resolveByDefault
Boolean indicating whether the jmod should be one of the default resolved modules in an application. Default is true.
moduleWarnings
Whether to emit warnings when resolving modules which are not recommended for use. Comma-separated list of one of more of the following:
deprecated
Warn if module is deprecated
leaving
Warn if module is deprecated for removal
incubating
Warn if module is an incubating (not yet official) module

Supported nested elements:

<classpath>
Path indicating where to locate files to be placed in the jmod file.
<modulepath>
Path indicating where to locate dependencies.
<commandpath>
Path of directories containing native commands to include in jmod.
<headerpath>
Path of directories containing header files to include in jmod.
<configpath>
Path of directories containing user-editable configuration files to include in jmod.
<legalpath>
Path of directories containing legal notices to include in jmod.
<nativelibpath>
Path of directories containing native libraries to include in jmod.
<manpath>
Path of directories containing man pages to include in jmod.
<version>
Module version of jmod. Must have a required number attribute. May also have optional preRelease and build attributes.
<moduleWarning>
Has one required attribute, reason. See moduleWarnings attribute above. This element may be specified multiple times.

destFile and classpath are required data.

Since:
1.10.6