org.apache.ant.compress.taskdefs
Class Pack200Normalize

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.ant.compress.taskdefs.Pack200Normalize
All Implemented Interfaces:
java.lang.Cloneable

public class Pack200Normalize
extends org.apache.tools.ant.Task

Task to "normalize" a JAR archive so that a signature applied to it will still be valid after a pack200/unpack200 cycle.

As stated in Pack200.Packer's javadocs applying a Pack200 compression to a JAR archive will in general make its sigantures invalid. In order to prepare a JAR for signing it should be "normalized" by packing and unpacking it. This is what this task does.

Since:
Apache Compress Antlib 1.1

Field Summary
 
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
Pack200Normalize()
           
 
Method Summary
 void addConfiguredProperty(org.apache.tools.ant.types.Environment.Variable prop)
          Sets a property for the Pack200 packer.
 void execute()
           
 void setDestFile(java.io.File d)
          The destination archive.
 void setForce(boolean b)
          Whether to force normalization of the archive even if the destination is up-to-date.
 void setSrcFile(java.io.File s)
          The JAR archive to normalize.
 
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
 

Constructor Detail

Pack200Normalize

public Pack200Normalize()
Method Detail

setSrcFile

public void setSrcFile(java.io.File s)
The JAR archive to normalize.


setDestFile

public void setDestFile(java.io.File d)
The destination archive.


setForce

public void setForce(boolean b)
Whether to force normalization of the archive even if the destination is up-to-date.

You must set this to true if you don't specify a destFile or the archive will never get normalized.


addConfiguredProperty

public void addConfiguredProperty(org.apache.tools.ant.types.Environment.Variable prop)
Sets a property for the Pack200 packer.


execute

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