ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hawkins, Keith" <>
Subject RE: Newbie ant question
Date Thu, 20 Mar 2003 14:03:57 GMT
The target will always get executed because there is no dependency rule to
prevent it.
The copy rule with overwrite set to false will skip the copy.
So the target executes but it is a "no-op"

-----Original Message-----
From: Norman Walsh []
Sent: Thursday, March 20, 2003 8:57 AM
Subject: Re: Newbie ant question

Hash: SHA1

/ Stefan Bodewig <> was heard to say:
| The overwrite="true" is the problem as it disables dependency
| checking.  Set it to false (or somply omit it) and things should work
| as expected.

No, this target

  <target name="dm-example.xml.cdata">
    <echo message="Building CDATA version of dm-example.xml ..." />
    <copy file="dm-example.xml" tofile="dm-example.xml.cdata"/>
    <replace file="dm-example.xml.cdata" token="&amp;" value="&amp;amp;"/>
    <replace file="dm-example.xml.cdata" token="&lt;" value="&amp;lt;"/>

still gets executed every time. But the replacements occur over and
over again. The trick is finding some simple way to tell ant that the
target dm-example.xml.cdata should be run if and only if
dm-example.xml is newer than dm-example.xml.cdata.

(I'm aware that the target name is probably irrelevant, it's simply
getting the dependency with a simpler idiom than I gave before that's
stumping me.)

                                        Be seeing you,

- -- 
Norman.Walsh@Sun.COM    | It is not impossibilities which fill us with
XML Standards Architect | the deepest despair, but possibilities which
Web Tech. and Standards | we have failed to realize.--Robert Mallet
Sun Microsystems, Inc.  | 
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <>


To unsubscribe, e-mail:
For additional commands, e-mail:
-----  This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. If
you receive this message in error, please delete it and all copies from your
system, destroy any hard copies and notify the sender. You must not,
directly or indirectly, use, disclose, distribute, print, or copy any part
of this message if you are not the intended recipient. Nomura Holding
America Inc., Nomura Securities International, Inc, and their respective
subsidiaries each reserve the right to monitor all e-mail communications
through its networks. Any views expressed in this message are those of the
individual sender, except where the message states otherwise and the sender
is authorized to state the views of such entity. Unless otherwise stated,
any pricing information in this message is indicative only, is subject to
change and does not constitute an offer to deal at any price quoted. Any
reference to the terms of executed transactions should be treated as
preliminary only and subject to our formal written confirmation.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message