Class JlinkTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.MatchingTask
org.apache.tools.ant.taskdefs.optional.jlink.JlinkTask
- All Implemented Interfaces:
- Cloneable,- SelectorContainer
This task defines objects that can link together various jar and
 zip files.  It is not related to the 
jlink tool present in
 Java 9 and later;  for that, see
 Link.
 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>
 - 
Field SummaryFields inherited from class org.apache.tools.ant.taskdefs.MatchingTaskfilesetFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionEstablishes the object that contains the files to be added to the output.Establishes the object that contains the files to be merged into the output.voidexecute()Does the adding and merging.voidsetAddfiles(Path addfiles) Sets the files to be added into the output.voidsetCompress(boolean compress) Defines whether or not the output should be compacted.voidsetMergefiles(Path mergefiles) Sets the files to be merged into the output.voidsetOutfile(File outfile) The output file for this run of jlink.Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTaskadd, 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, XsetItemsMethods inherited from class org.apache.tools.ant.TaskbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation
- 
Constructor Details- 
JlinkTaskpublic JlinkTask()
 
- 
- 
Method Details- 
setOutfileThe output file for this run of jlink. Usually a jar or zip file.- Parameters:
- outfile- the output file
 
- 
createMergefilesEstablishes the object that contains the files to be merged into the output.- Returns:
- a path to be configured
 
- 
setMergefilesSets the files to be merged into the output.- Parameters:
- mergefiles- a path
 
- 
createAddfilesEstablishes the object that contains the files to be added to the output.- Returns:
- a path to be configured
 
- 
setAddfilesSets the files to be added into the output.- Parameters:
- addfiles- a path
 
- 
setCompresspublic void setCompress(boolean compress) Defines whether or not the output should be compacted.- Parameters:
- compress- a- booleanvalue
 
- 
executeDoes the adding and merging.- Overrides:
- executein class- Task
- Throws:
- BuildException- on error
 
 
-