Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#27 New task to alter zip files to be coverage-enabled

Next Release
Matt Albrecht
Matt Albrecht

Add a new task, similar to Cactus' "cactifywar" task,
which takes an existing WAR/JAR/EAR/SAR/ZIP file, and
adds in the coverage-enabled classes to the right location.

This should be powerful, yet easy to use. Something like:

<alter-ear src="orig.ear"
dest="orig-coverage.ear" use-grobolib="false">
<alter-war src="inner.war">
<classes dir="${coverage.dir}/classes" />
file="${output.dir}/alreadyConstructed.jar" />
<alter-zip src="uses.jar">
dir="${alt.coverage.dir}/classes" />

This task would allow for one or more "zip"-like files
to be reconstructed under a different name. The
primary task would specify the GroboCoverage runtime
library location, which would be implicitly included in
all reconstructed zips (unless explicitly told not to).

Each "alter" type task is similar to the "alter-zip",
except that they have specific knowledge about their
file type. All "fileset"s act like zipfilesets (except
lib - it includes one file). That is, they have the
possibility of specifying a directory to place it under
in the zip file.

If an alter task doesn't have a dest attribute, it will
replace the source with the new file. The task should
use a temporary file in this case, which will "move" to
replace the original.

I need to examine the usage of "grobolib" here. By
explicitly having to declare where the library exists,
the user becomes aware of its necessity. I'll probably
just add a tag "grobo-lib" to declare when/where to add
it. the "alter-zip" would add its contents into the zip.

Perhaps the "alter-jar" task should include a
manifest-altering extention to the "grobo-lib" tag,
such that the manifest can add the grobo-lib file name
(path optional) to the manifest.


  • Matt Albrecht
    Matt Albrecht

    Logged In: YES

    Change the top-task name to "grobo-zip", perhaps?

  • Logged In: NO

    Work has started on this feature.

  • Matt Albrecht
    Matt Albrecht

    • status: open --> closed
  • Matt Albrecht
    Matt Albrecht

    Logged In: YES

    This has been implemented. It will be included in
    GroboCoverage 1.1.0