ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: [OT] Ant-driven update system (Re: Best way to add file to CVS repository?)
Date Sun, 30 Dec 2001 06:14:38 GMT
On Thu, Dec 27, 2001 at 08:13:34PM +0100, Nico Seessle wrote:
> ----- Original Message -----
> From: "Jeff Turner" <>
> To: <>
> Cc: "Ant Developers List" <>
> Sent: Thursday, December 27, 2001 8:56 AM
> Subject: [OT] Ant-driven update system (Re: Best way to add file to CVS
> repository?)
> > Incidentally, 'diff -N' is not a general, nor cross-platform, solution
> > to the problem of how to convey updates.
> Do you know a plattform where cvs is not available? I've even found
> references to ports to AS/400 and MVS that are in the works.

But it's not on 80% of the boxes that websites get deployed to. Nor
would it be any use on those boxes, as they're behind firewalls.

But my problem isn't with CVS, but with the inadequacy of 'diff' as the
sole way of conveying updates. Diffs can't convey the information "this
file was deleted", They can convey "this file was added", but only as a
hack which is inappropriate for binary files like jars, and rarely used
in practice.

> > 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.
> There are other people inventing replacements for cvs, for example
> which should also work thru firewalls as it
> uses WebDAV for repository access.

Subversion is going to totally rock :) I hope Apache is one of the first
to switch from CVS.

Subversion's "tree delta" is most relevant here:

  "A tree delta describes changes between two directory trees, the
  source tree and the target tree. Tree deltas can describe copies,
  renames, and deletions of files and directories, changes to file
  contents, and changes to property lists. 


  A tree delta is a list of changes of the form

  which describe how to edit the contents of source-dir to yield
  target-dir. There are three kinds of changes:

  <delete name='name'/>
   Source-dir has an entry named name, which is not present in

  <add name='name'>content</add>
   target-dir has an entry named name, which is not present in
   source-dir; content describes the file or directory to which the
   new directory entry refers.

  <replace name='name'>content</replace>
   Both source-dir and target-dir have an entry named name, which
   has changed; content describes the new file or directory."


Now don't those <delete>, <add> and <replace> tasks seem awfully similar
to Ant's <delete>, <copy> and <move>?

So for my purposes (updating websites), Subversion deltas would be
better in the long run, but I think I can do an equivalent job with Ant.
Because it's based on Java, it's cross-platform, and Subversion "blue
sky items" like digital signatures are possible right now (jar

> > Basically, a jar file that knows what to do with itself. Much like an
> > RPM or .deb file.
> Can you deliver *patches* with rpm or deb-packages? I always thought they
> would always contain the complete package and - maybe - now how to update an
> older installation if there is one avaialble. But you always need to
> distribute the whole package, don't you?

Not sure.. I don't think so. They're just archives ('ar' and 'tar' in
the case of .debs) with metadata and shell scripts telling the host
system what to do with the files.

> Okay, but what you are describing is really a system to patch distibuted
> software, isn't it? Personally, I don't think that a project which aims to
> be "a Java based build tool" should care about patching your installations.
> Maybe a task to create such a patch would be nice to have in Ant, but the
> invention of the complete patch-system goes beyond the target of Ant.

Who says Ant most _only_ be a "Java based build tool"? ;) I want to use
Ant as a "cross-platform scripting language". Ovidiu Predescu and I are
using Ant as a "functional testing tool"..

I can't wait till Ant 2 arrives.. hopefully the distinction between
"ant-core", and "ant-the-build-tool" will become much clearer.


> Nico

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

View raw message