ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: txtfile with various lines
Date Thu, 09 Dec 2004 14:26:10 GMT
> in other words
> <echo message=${servrestart}/>

Sorry that is invalid - invalid xml. Attribute values have to be quoted.

<echo message="${servrestart}"/>

Then the Ant runtime would search for a property servrestart and evaluates
that to its value or - if not set - to ${servrestart}. So you´ll get
a) with value=Hello World
   [echo] Hello World
b) not set
   [echo] ${servrestart}

Back to the original thread: what you can do with unset properties is

<target name="server.check">
    <loadfile property="servrestart"> ...
</target>
<target name="server" depends="server.check" if="servrestart">
    <echo>Property set. Server has to be restarted.</echo>
</target>


Jan

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