ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Walsh <...@nwalsh.com>
Subject Re: Newbie ant question
Date Thu, 20 Mar 2003 13:57:03 GMT
-----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-----

Mime
View raw message