You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Torgeir Veimo <to...@pobox.com> on 2006/03/30 15:35:27 UTC

forced update with war target

I'm using the war target to update a war file, with update="true", but
it seems it only updated files that has a newer timestamp than those in
the war file. 

Is there a way to force all files that I specify to be updated in the
war file?
-- 
Torgeir Veimo <to...@pobox.com>


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


RE: forced update with war target

Posted by Bohica0682 <da...@hotmail.com>.
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 <to...@pobox.com>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/forced-update-with-war-target-tp3670020p16597296.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


RE: forced update with war target

Posted by Torgeir Veimo <to...@pobox.com>.
On Thu, 2006-03-30 at 09:41 -0800, Res Pons wrote:
> Since a war file is, more or less, a zip file...I say give the zip task a 
> try.  I think it would work better for what you're trying to accomplish.

I tried that, it has the same behaviour. 

-- 
Torgeir Veimo <to...@pobox.com>


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


RE: forced update with war target

Posted by Res Pons <po...@hotmail.com>.
Since a war file is, more or less, a zip file...I say give the zip task a 
try.  I think it would work better for what you're trying to accomplish.

----Original Message Follows----
From: Torgeir Veimo <to...@pobox.com>
Reply-To: "Ant Users List" <us...@ant.apache.org>
To: user@ant.apache.org
Subject: forced update with war target
Date: Thu, 30 Mar 2006 15:35:27 +0200
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by 
bay0-mc12-f13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 
30 Mar 2006 05:36:01 -0800
Received: (qmail 44310 invoked by uid 500); 30 Mar 2006 13:35:51 -0000
Received: (qmail 44233 invoked by uid 99); 30 Mar 2006 13:35:51 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49)    by 
apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Mar 2006 05:35:51 -0800
Received: pass (asf.osuosl.org: domain of torgeir@pobox.com designates 
207.106.133.28 as permitted sender)
Received: from [207.106.133.28] (HELO proof.pobox.com) (207.106.133.28)    
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Mar 2006 05:35:50 -0800
Received: from proof (localhost [127.0.0.1])by proof.pobox.com (Postfix) 
with ESMTP id 3D8A0C5B30for <us...@ant.apache.org>; Thu, 30 Mar 2006 08:35:30 
-0500 (EST)
Received: from [192.168.15.101] (ti521110a080-4931.bb.online.no 
[85.167.103.71])(using SSLv3 with cipher RC4-MD5 (128/128 bits))(No client 
certificate requested)by proof.sasl.smtp.pobox.com (Postfix) with ESMTP id 
8D6B333C25for <us...@ant.apache.org>; Thu, 30 Mar 2006 08:35:29 -0500 (EST)
X-Message-Info: 6sSXyD95QpVORHx3PA1slRnqQXv9l+AU5fMPX/LMBVg=
Mailing-List: contact user-help@ant.apache.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <ma...@ant.apache.org>
List-Help: <ma...@ant.apache.org>
List-Post: <ma...@ant.apache.org>
List-Id: "Ant Users List" <user.ant.apache.org>
Delivered-To: mailing list user@ant.apache.org
X-ASF-Spam-Status: No, hits=-0.0 required=10.0tests=SPF_PASS
X-Spam-Check-By: apache.org
X-Mailer: Evolution 2.6.0 (2.6.0-1)
X-Virus-Checked: Checked by ClamAV on apache.org
Return-Path: user-return-55385-pons32=hotmail.com@ant.apache.org
X-OriginalArrivalTime: 30 Mar 2006 13:36:01.0307 (UTC) 
FILETIME=[E279CEB0:01C653FE]

I'm using the war target to update a war file, with update="true", but
it seems it only updated files that has a newer timestamp than those in
the war file.

Is there a way to force all files that I specify to be updated in the
war file?
--
Torgeir Veimo <to...@pobox.com>


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

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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