Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

RE: forced update with war target

Bohica0682

2008-04-09


Author LoginPost Reply

I've had the same problem. I think I found a solution that will work until
they fix it in version 1.8 as described in the bug... can't remeber the
number. Anyway.
Basically, I am copying all of the files that I will be updating the jar/war
file with into a tmp directory, then update the jar/war from that instead of
the main directory. That way all of the files being copied into the jar/war
are newer than the ones in the jar/war. Then I use the delete command to
remove the tmp directory and VOILA!!! Works beautifully.   B-)

Enjoy,
Bohica



Torgeir Veimo wrote:
>
> On Thu, 2006-03-30 at 15:04 +0100, Keith Hatton wrote:
>> Option 1. <touch> the files before <war> so that they will definitely
>> have a newer timestamp.
>>
>> Option 2. <unwar> the archive, <copy overwrite="true"> the files to be
>> replaced, then <war> to create a new WAR file.
>
> The war file has 3000+ files. I was doing it this way to create a faster
> build process, so option 2 is undesirable. Option 1 is not really an
> option since the files comes from the source directory, and I'd like to
> no touch them.
>
> Is it possible by writing some small java code? I guess it's not too
> easy to replace the code that compares timestamps in the zip task..
>
> --
> Torgeir Veimo <torgeir@(protected)>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.