ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject [OT] Ant-driven update system (Re: Best way to add file to CVS repository?)
Date Thu, 27 Dec 2001 07:56:52 GMT
(Cc'ing ant-dev for thread continuity.. please don't reply there:)

Incidentally, 'diff -N' is not a general, nor cross-platform, solution
to the problem of how to convey updates.

I'd like to invent one though :) I was thinking along the lines of a
.jar file containing updates, with an Ant script, META-INF/control.xml,
which describes how the contents of the jar must be applied.

Basically, a jar file that knows what to do with itself. Much like an
RPM or .deb file.

These jars are 'applied' to a system by running another Ant script,

 - optionally fetches the jar via a HTTP GET.
 - verifies the jar signature
 - unpacks the jar, and transfers control to META-INF/control.xml,
   - Ensures that the files to be replaced/patched validate against a
     MD5 checksum (to be sure we're not overwriting modifications)
   - If they do, replace/patch/remove them.
   - Optionally do things like restart Tomcat, if the updates are for a
 - Control then passes back to the invoking script, which cleans up.

My primary use-case is that of distributing updates to a client-managed
website. Each 'update' consists of new/modified jars, a few JSPs, and
perhaps a web.xml modification. These can't be done via CVS because
they're behind a firewall, and can't be done with 'diff', because
they're on WinNT. Hence the need for a cross-platform mechanism for
applying self-contained updates.

Anyone know of something like this, or a better solution? If anyone's
interested, I have a prototype (without the jar signature verification
or MD5 checksumming), and would be happy to collaborate further in the
development of such a system.


On Thu, Dec 27, 2001 at 05:38:48PM +1100, Jeff Turner wrote:
> On Wed, Dec 26, 2001 at 08:36:15PM -0600, Steve Cohen wrote:
> > What is the best way for someone not a committer to submit a totally new
> > file for the ant CVS repository?  Last time I did this, I just sent it
> > an an attachment with the bug report I'd submitted.  
> > 
> > However, this seems like a kludgey way to go about it.  Ideally, it
> > seems to me, a new file should fit into the CVS patch file the way
> > anything else does.  But of course, since you haven't checked it out,
> > CVS knows nothing about it and cvs diff won't work.  Is there a way to
> > get this into the patches file?  Or is sending it as a separate
> > attachment the only way?
> One way is to:
> a) get the cvsutils scripts from
>    Worth getting anyway. I don't know what I'd do without 'cvsco' :)
> b) Do a 'cvsdo add <file>', which modifies CVS/Entries to mark the file
> as new (without contacting the server).
> c) Generate the diff with 'cvs -RuN' (Recursion, unified, New files).
> 'man diff' says:
>   -N
>   --new-file
>      In directory comparison, if a file is found in only one directory,
>      treat it as present but empty in the other directory.
> I can add this to the task guidelines if it's not deemed to hackish :)
> --Jeff
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message