ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Kafrissen" <dkafris...@yahoo.com>
Subject Re: replacing files in war/jar/zip file
Date Thu, 11 Sep 2003 19:57:54 GMT
If I understand the problem I am having a similar problem.

When I create a jar file from the command line I use the -c option to JAR
which always creates a new archive.

However, the jar task in ANT does not update the files for me in the JAR
file if the JAR file already exists no matter what I do. I am using java
1.4.2. Do I have to delete the jar file each time?
<Jan.Materne@rzf.fin-nrw.de> wrote in message
news:879A5AD5DD0ED511891F0003473A9B5608FF6F13@Z011004...
> You can <touch> your local files before updating the archive.
>
>
> Jan
>
>
> > -----Original Message-----
> > From: John Holman [mailto:j.g.holman@qmul.ac.uk]
> > Sent: Thursday, September 04, 2003 1:55 PM
> > To: user@ant.apache.org
> > Subject: replacing files in war/jar/zip file
> >
> >
> > I'm trying to use ant to replace unconditionally some files in a war
> > file. The aim is for a system administrator to update the war file
> > provided by a developer with their own local versions of custom
> > configuration files, WEB-INF/web.xml and
> > META-INF/context.xml. The files
> > provided by the system administrator should override any
> > files with the
> > same name in the war file that might have been included by
> > the developer.
> >
> > The jar task with update="true" does what I want provided the
> > files are
> > more recent than those already in the war file. However I
> > want the local
> > files to override files in the archive regardless of their date, and
> > can't find a straighforward way to do this. (I can copy all
> > files from
> > the original archive and then add the local files, but then I get two
> > versions of the file with the same filename in the resulting archive).
> >
> > Perhaps there should be a new attribute for the zip task, e.g.
> > update="always" or replace="true", that means add all files
> > mentioned in
> > child fileset elements etc into the new archive, and then add
> > files from
> > the original archive that have not already been seen.
> >
> > In the absence of this, any ideas? Am I missing something?
> >
> > Many thanks, John.
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
>




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message