Name
jlink
Synopsis
Builds a JAR or ZIP file, optionally merging contents of existing JAR
and ZIP archives. When duplicate files exist, the first is accepted
and subsequent entries are ignored. When merging archives, existing
META-INF
directories are ignored.
Attributes
-
addfiles
(all, Path, *) A list of files for addition to the archive. These are added as individual files, even if they are JAR or ZIP archives. Use the
mergefiles
attribute or nested element to merge contents of existing JAR or ZIP archives.-
compress
(all, boolean, N) If
true
, compress the output. Defaults tofalse
.-
defaultexcludes
(all, boolean, N) Determines whether to use default excludes. Defaults to
true
.-
excludes
(all, String, N) A comma-separated list of file patterns to exclude.
-
excludesfile
(all, File, N) The name of a file containing one exclude pattern per line.
-
includes
(all, String, N) A comma-separated list of file patterns to include.
-
includesfile
(all, File, N) A comma-separated list of file patterns to include.
-
mergefiles
(all, Path, *) A list of files for addition to the archive. Contents of
.jar
and.zip
files are merged into the output archive, rather than added as JAR and ZIP files.-
outfile
(all, File, Y) The target archive — for example,
myproj.jar
.
At least one of addfiles
or
mergefiles
is required, or else the corresponding
nested elements are.
Content
- 0..n nested
patternset
elements:<exclude>
,<include>
,<patternset>
(all);<excludesfile>
,<includesfile>
(1.4) Used in place of their corresponding attributes, ...
Get Ant: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.