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.

Close

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

Next Release
closed
Matt Albrecht
3
2004-04-18
2004-03-08
Matt Albrecht
No

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:

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

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.

Discussion

  • Matt Albrecht
    Matt Albrecht
    2004-03-09

    Logged In: YES
    user_id=171822

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

     
  • Logged In: NO

    Work has started on this feature.

     
  • Matt Albrecht
    Matt Albrecht
    2004-04-18

    • status: open --> closed
     
  • Matt Albrecht
    Matt Albrecht
    2004-04-18

    Logged In: YES
    user_id=171822

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