|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
net.sourceforge.groboutils.codecoverage.v2.ant.GroboReZipTask
Similar to the Zip task, but its purpose is to modify not only one zip file, but possibly many containing zip files as well. Also, should have meta-inf support for modifying the classpath to add in the runtime jar file.
Nested Class Summary | |
static class |
GroboReZipTask.AlterEar
|
static class |
GroboReZipTask.AlterJar
|
static class |
GroboReZipTask.AlterWar
|
static class |
GroboReZipTask.AlterZip
the base type for altering a zip file. |
static class |
GroboReZipTask.AlterZipModifyEntry
Recursively alter the inner zip file, by writing its contents to temporary files. |
static class |
GroboReZipTask.ModifyEntry
Tells the processing system that a particular file needs to be modified. |
static class |
GroboReZipTask.ReZipFileSet
|
Field Summary |
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
GroboReZipTask()
|
Method Summary | |
void |
addAlterEar(GroboReZipTask.AlterEar z)
|
void |
addAlterJar(GroboReZipTask.AlterJar z)
|
void |
addAlterWar(GroboReZipTask.AlterWar z)
|
void |
addAlterZip(GroboReZipTask.AlterZip z)
|
protected void |
addParentDirs(java.io.File baseDir,
java.lang.String entry,
ZipOutputStream zOut,
java.lang.String prefix,
int dirMode,
java.util.Vector addedFiles,
boolean replaceOnly)
Ripped from Ant's Zip task. |
protected void |
addResources(GroboReZipTask.AlterZip az,
org.apache.tools.ant.types.FileSet fileset,
java.lang.String[] resources,
boolean areDirs,
ZipOutputStream zOut,
java.util.Vector addedFiles,
java.util.Vector originalFiles)
Add the given resources. |
void |
execute()
|
protected void |
finalizeZipOutputStream(ZipOutputStream zOut)
method for subclasses to override |
protected void |
initZipOutputStream(ZipOutputStream zOut)
method for subclasses to override |
void |
processZip(GroboReZipTask.AlterZip az,
java.io.File src,
java.io.File dest)
|
protected void |
zipDir(java.io.File dir,
ZipOutputStream zOut,
java.lang.String vPath,
int mode,
java.util.Vector addedFiles)
Ripped from Ant's Zip task. |
protected void |
zipFile(GroboReZipTask.AlterZip az,
java.io.File file,
ZipOutputStream zOut,
java.lang.String vPath,
int mode,
java.util.Vector addedFiles)
Ripped from Ant's Zip task. |
protected void |
zipFile(GroboReZipTask.AlterZip az,
GroboReZipTask.ModifyEntry me,
java.io.InputStream in,
ZipOutputStream zOut,
java.lang.String vPath,
long lastModified,
java.io.File fromArchive,
int mode,
java.util.Vector addedFiles)
Ripped from Ant's Zip task. |
Methods inherited from class org.apache.tools.ant.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 org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GroboReZipTask()
Method Detail |
public void addAlterZip(GroboReZipTask.AlterZip z)
public void addAlterWar(GroboReZipTask.AlterWar z)
public void addAlterEar(GroboReZipTask.AlterEar z)
public void addAlterJar(GroboReZipTask.AlterJar z)
public void execute() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
public void processZip(GroboReZipTask.AlterZip az, java.io.File src, java.io.File dest) throws org.apache.tools.ant.BuildException, java.io.IOException
org.apache.tools.ant.BuildException
java.io.IOException
protected final void addResources(GroboReZipTask.AlterZip az, org.apache.tools.ant.types.FileSet fileset, java.lang.String[] resources, boolean areDirs, ZipOutputStream zOut, java.util.Vector addedFiles, java.util.Vector originalFiles) throws java.io.IOException
fileset
- may give additional information like fullpath or
permissions.resources
- the resources to addzOut
- the stream to write to
java.io.IOException
protected final void addParentDirs(java.io.File baseDir, java.lang.String entry, ZipOutputStream zOut, java.lang.String prefix, int dirMode, java.util.Vector addedFiles, boolean replaceOnly) throws java.io.IOException
java.io.IOException
protected void zipDir(java.io.File dir, ZipOutputStream zOut, java.lang.String vPath, int mode, java.util.Vector addedFiles) throws java.io.IOException
java.io.IOException
protected void zipFile(GroboReZipTask.AlterZip az, java.io.File file, ZipOutputStream zOut, java.lang.String vPath, int mode, java.util.Vector addedFiles) throws java.io.IOException
This implementation delegates to the six-arg version.
file
- the file to add to the archivezOut
- the stream to write tovPath
- the name this entry shall have in the archivemode
- the Unix permissions to set.
java.io.IOException
protected void zipFile(GroboReZipTask.AlterZip az, GroboReZipTask.ModifyEntry me, java.io.InputStream in, ZipOutputStream zOut, java.lang.String vPath, long lastModified, java.io.File fromArchive, int mode, java.util.Vector addedFiles) throws java.io.IOException
in
- the stream to read data for the entry from.zOut
- the stream to write to.vPath
- the name this entry shall have in the archive.lastModified
- last modification time for the entry.fromArchive
- the original archive we are copying this
entry from, will be null if we are not copying from an archive.mode
- the Unix permissions to set.
java.io.IOException
protected void initZipOutputStream(ZipOutputStream zOut) throws java.io.IOException, org.apache.tools.ant.BuildException
java.io.IOException
org.apache.tools.ant.BuildException
protected void finalizeZipOutputStream(ZipOutputStream zOut) throws java.io.IOException, org.apache.tools.ant.BuildException
java.io.IOException
org.apache.tools.ant.BuildException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |