org.apache.beehive.controls.runtime.packaging
Class ControlJarTask

Object
  extended by ProjectComponent
      extended by Task
          extended by MatchingTask
              extended by Zip
                  extended by Jar
                      extended by ControlJarTask
All Implemented Interfaces:
SelectorContainer

public class ControlJarTask
extends Jar

The ControlTask class extends the standard ant Jar task to perform additional processing for JAR files that contain Beehive Controls.


Nested Class Summary
 
Nested classes/interfaces inherited from class Jar
Jar.FilesetManifestConfig
 
Nested classes/interfaces inherited from class Zip
Zip.ArchiveState, Zip.Duplicate, Zip.WhenEmpty
 
Field Summary
 
Fields inherited from class Zip
addedDirs, archiveType, doubleFilePass, duplicate, emptyBehavior, entries, skipWriting, zipFile
 
Fields inherited from class MatchingTask
fileset
 
Fields inherited from class Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class ProjectComponent
project
 
Constructor Summary
ControlJarTask()
           
 
Method Summary
protected  void addToManifest(Manifest jarManifest, List<File> mergeList)
           
protected  void cleanUp()
          Reset the manifest file list to be empty
protected  Resource[][] grabResources(FileSet[] filesets)
          Step #1: Wrap the implementation of Zip.grabResources.
protected  void initZipOutputStream(ZipOutputStream zOut)
          Step #2: Override Jar.initZipOutputStream to inject manifest sections.
 
Methods inherited from class Jar
addConfiguredIndexJars, addConfiguredManifest, addMetainf, createEmptyZip, finalizeZipOutputStream, findJarName, getResourcesToAdd, grabFilesAndDirs, reset, setFilesetmanifest, setIndex, setJarfile, setManifest, setManifestEncoding, setWhenempty, writeIndexLikeList, zipFile
 
Methods inherited from class Zip
addFileset, addParentDirs, addResources, addZipfileset, addZipGroupFileset, execute, executeMain, getComment, getDestFile, getEncoding, isAddingNewFiles, isCompress, isEmpty, isInUpdateMode, selectFileResources, setBasedir, setComment, setCompress, setDestFile, setDuplicate, setEncoding, setFile, setFilesonly, setKeepCompression, setRoundUp, setUpdate, setZipfile, zipDir, zipDir, zipFile
 
Methods inherited from class MatchingTask
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
 
Methods inherited from class Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class ProjectComponent
getProject
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlJarTask

public ControlJarTask()
Method Detail

grabResources

protected Resource[][] grabResources(FileSet[] filesets)
Step #1: Wrap the implementation of Zip.grabResources. This method identifies the set of resources to be stored in the JAR file. For each added/updated resource, the overrided method will look for an associated .manifest file that any JAR manifest data to add/update in the JAR manifest.

Overrides:
grabResources in class Zip

initZipOutputStream

protected void initZipOutputStream(ZipOutputStream zOut)
                            throws IOException,
                                   BuildException
Step #2: Override Jar.initZipOutputStream to inject manifest sections. This is done by treating them as if they were 'inline' entries, from a task perspective.

Overrides:
initZipOutputStream in class Jar
Throws:
IOException
BuildException

addToManifest

protected void addToManifest(Manifest jarManifest,
                             List<File> mergeList)

cleanUp

protected void cleanUp()
Reset the manifest file list to be empty

Overrides:
cleanUp in class Jar