org.jdesktop.deployment.ant.pack200
Class Pack200Task

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.Copy
              extended by org.jdesktop.deployment.ant.pack200.Pack200Task
All Implemented Interfaces:
Cloneable

public class Pack200Task
extends org.apache.tools.ant.taskdefs.Copy

Ant Task performing the pack200 operation on a single file or on a fileset.

Version:
$Revision: 14720 $, $Date: 2011-09-15 17:17:42 +0200 (Thu, 15 Sep 2011) $
Author:
Kumar Srinivasan, Emmanuel Bourg

Field Summary
static List DEFLATE_HINT_VALUES
           
static List MODIFICATION_TIME_VALUES
           
static List UNKNOWN_ATTRIBUTE_VALUES
           
 
Fields inherited from class org.apache.tools.ant.taskdefs.Copy
completeDirMap, destDir, destFile, dirCopyMap, failonerror, file, fileCopyMap, fileUtils, filtering, flatten, forceOverwrite, includeEmpty, mapperElement, preserveLastModified, rcs, verbosity
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
Pack200Task()
           
 
Method Summary
protected  void doFileOperations()
           
 void execute()
           
protected  Properties getPackProperties()
          Returns the packing properties from the property file if specified.
 void setConfigFile(File config)
          Useful to set those Pack200 attributes which are not commonly used.
 void setDeflateHint(String value)
          Sets the deflate hint for the archive
 void setDestfile(File destFile)
          Deprecated. Use setTofile() instead
 void setEffort(int value)
          Sets the effort.
 void setGZIPOutput(boolean value)
          Sets whether the pack archive is additionally deflated with gzip.
 void setKeepFileOrder(boolean value)
          Sets the file ordering.
 void setModificationTime(String value)
          Sets the modification time for the archive
 void setRepack(boolean value)
          Sets the repack option, ie the jar will be packed and repacked.
 void setSegmentLimit(int value)
          Sets the segment limit.
 void setSrc(File src)
          Deprecated. Use setFile() instead
 void setStripDebug(boolean value)
          Sets whether the Java debug attributes should be stripped
 void setUnknownAttribute(String value)
          Sets the action to be taken if an unknown attribute is encountered.
protected  void validateAttributes()
           
 
Methods inherited from class org.apache.tools.ant.taskdefs.Copy
add, add, addFileset, buildMap, buildMap, createFilterChain, createFilterSet, createMapper, doResourceOperations, getEncoding, getFileUtils, getFilterChains, getFilterSets, getOutputEncoding, getPreserveLastModified, isEnableMultipleMapping, scan, scan, setEnableMultipleMappings, setEncoding, setFailOnError, setFile, setFiltering, setFlatten, setGranularity, setIncludeEmptyDirs, setOutputEncoding, setOverwrite, setPreserveLastModified, setPreserveLastModified, setTodir, setTofile, setVerbose, supportsNonFileResources
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODIFICATION_TIME_VALUES

public static final List MODIFICATION_TIME_VALUES

DEFLATE_HINT_VALUES

public static final List DEFLATE_HINT_VALUES

UNKNOWN_ATTRIBUTE_VALUES

public static final List UNKNOWN_ATTRIBUTE_VALUES
Constructor Detail

Pack200Task

public Pack200Task()
Method Detail

validateAttributes

protected void validateAttributes()
Overrides:
validateAttributes in class org.apache.tools.ant.taskdefs.Copy

setSrc

public void setSrc(File src)
Deprecated. Use setFile() instead

Set the file to pack. This method remains to maintain the backward compatibility. The setFile() method is preferred.

Parameters:
src - the source file

setDestfile

public void setDestfile(File destFile)
Deprecated. Use setTofile() instead

Set the destination file. This method remains to maintain the backward compatibility. The setTofile() method is preferred.

Parameters:
destFile - the destination file

setRepack

public void setRepack(boolean value)
Sets the repack option, ie the jar will be packed and repacked.


setGZIPOutput

public void setGZIPOutput(boolean value)
Sets whether the pack archive is additionally deflated with gzip.


setStripDebug

public void setStripDebug(boolean value)
Sets whether the Java debug attributes should be stripped


setModificationTime

public void setModificationTime(String value)
Sets the modification time for the archive


setDeflateHint

public void setDeflateHint(String value)
Sets the deflate hint for the archive


setKeepFileOrder

public void setKeepFileOrder(boolean value)
Sets the file ordering.


setSegmentLimit

public void setSegmentLimit(int value)
Sets the segment limit.


setEffort

public void setEffort(int value)
Sets the effort.


setUnknownAttribute

public void setUnknownAttribute(String value)
Sets the action to be taken if an unknown attribute is encountered.


setConfigFile

public void setConfigFile(File config)
Useful to set those Pack200 attributes which are not commonly used.


execute

public void execute()
Overrides:
execute in class org.apache.tools.ant.taskdefs.Copy

getPackProperties

protected Properties getPackProperties()
Returns the packing properties from the property file if specified.


doFileOperations

protected void doFileOperations()
Overrides:
doFileOperations in class org.apache.tools.ant.taskdefs.Copy


Copyright © 2005-2012 Codehaus. All Rights Reserved.