ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Auto task need to take backup before deployemnt
Date Wed, 18 Jan 2006 05:09:42 GMT
On Tue, 17 Jan 2006, Karthik <> wrote:

>   Does this mean  i have been asking "Dumb Questions"

There is a difference between "dumb" and "not smart".

>   and the form is for asking smart Questions only...

No, but you'll generally get better answers if you ask your questions
in a smart way.  See, one answer to your question could be

<copy todir="${backup}">
  <fileset dir="${deploy}"/>

which assumes a bunch of things:

* the server you deploy to is local

* you have a property pointing to the directory you've deployed to

* there actually is such a directory.  Some application servers deploy
  war files without exploding them, so there is no directory to start
  from.  Actually, I'm assuming here that you mean "deploying a web
  application to an application server" when you say deploy.

* with backup you mean simply copying the stuff to a save place, you
  already have that save place, it is a local directory and you have a
  property pointing to it.

Instead of my last assumption I could also assume you need a backup
for each new deployment in form of a timestamped zip file in which
case a better answer would be

<zip destfile="${backups}/${DSTAMP}-${TSTAMP}.zip">
  <fileset dir="${deploy}"/>

If any of my assumptions is wrong, my answer is worthless for you -
and I have spent five minutes writing it.  The less things the people
who want to help must assume, the better.


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

View raw message