ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <khat...@axiomsystems.com>
Subject RE: War update = true
Date Wed, 25 Feb 2004 09:10:32 GMT
-----Original Message-----
>> So when is war/uptodate="true" valuable (or
>> zip/jar/war/ear for that
>> matter)?
>> 
>Ya got me.  ;)  Maybe when you just want to add files
>to an archive and they don't all exist in an
>uncompressed form?  Otherwise, someone might just have
>a preference to update rather than rebuild.  Maybe
>someone else has something more intelligent to say
>about that.

One example of using this that I have worked on recently is a WAR file that is designed to
be incorporated into other applications. The build scripts for these other applications take
a copy of the original WAR from SCM, and use <war update="true" ...> to customize it,
by adding their own web.xml, JSP files, images, etc., while leaving the core classes and WEB-INF/lib
folder unchanged. (Which is pretty much a concrete example of what you said above).

I think you'll find update="true" is slower because (a) of the timestamp comparison Matt originally
referred to, and (b) because you can't "replace" files in a JAR/WAR/EAR - you must create
a new archive - so the existing archive must be unzipped first and a new one built with the
correct files. It's probably best not to regard update="true" as a shortcut, but rather a
way of refining and controlling what happens.

Keith

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


Mime
View raw message