public class JlinkTask extends MatchingTask
It is basically a wrapper for the jlink code written originally by Patrick Beard. The classes org.apache.tools.ant.taskdefs.optional.jlink.Jlink and org.apache.tools.ant.taskdefs.optional.jlink.ClassNameReader support this class.
For example:
<jlink compress="false" outfile="out.jar"/> <mergefiles> <pathelement path="${build.dir}/mergefoo.jar"/> <pathelement path="${build.dir}/mergebar.jar"/> </mergefiles> <addfiles> <pathelement path="${build.dir}/mac.jar"/> <pathelement path="${build.dir}/pc.zip"/> </addfiles> </jlink>
fileset
description, location, project
Constructor and Description |
---|
JlinkTask() |
Modifier and Type | Method and Description |
---|---|
Path |
createAddfiles()
Establishes the object that contains the files to
be added to the output.
|
Path |
createMergefiles()
Establishes the object that contains the files to
be merged into the output.
|
void |
execute()
Does the adding and merging.
|
void |
setAddfiles(Path addfiles)
Sets the files to be added into the output.
|
void |
setCompress(boolean compress)
Defines whether or not the output should be compacted.
|
void |
setMergefiles(Path mergefiles)
Sets the files to be merged into the output.
|
void |
setOutfile(java.io.File outfile)
The output file for this run of jlink.
|
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
clone, getDescription, getLocation, getProject, setDescription, setLocation
public void setOutfile(java.io.File outfile)
outfile
- the output filepublic Path createMergefiles()
public void setMergefiles(Path mergefiles)
mergefiles
- a pathpublic Path createAddfiles()
public void setAddfiles(Path addfiles)
addfiles
- a pathpublic void setCompress(boolean compress)
compress
- a boolean
valuepublic void execute() throws BuildException
execute
in class Task
BuildException
- on error