ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hawkins, Keith" <KHawk...@us.nomura.com>
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 [mailto:ndw@nwalsh.com]
Sent: Thursday, March 20, 2003 8:57 AM
To: user@ant.apache.org
Subject: Re: Newbie ant question


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

/ Stefan Bodewig <bodewig@apache.org> 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;"/>
  </target>

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,
                                          norm

- -- 
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.  | 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>

iD8DBQE+ecivOyltUcwYWjsRAp6KAKCTCwkCLgeYtPJUhy1S9lCPqdj02wCfWvPZ
8imbK9BEi9FESQuIelzfXPg=
=Wuru
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
-----  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.

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