ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simeon H.K. Fitch" <sim...@fitch.net>
Subject Re: Ant2 and properties
Date Mon, 04 Dec 2000 16:09:49 GMT
On Tue, Dec 05, 2000 at 12:30:33AM +1100, Conor MacNeill wrote:
> 
> <property name="foo">
>    <string value="hello"/>
> </property>
> 
> A little verbose at first glance, compared with the current usage. In
> any case, we are also going to need to decide the future of the ${}
> syntax (too late to change it, IMHO) and what it would mean for
> non-string properties (equivalent to toString() method, perhaps)
> 

I think that is a fine approach, and then you could extend it to allow
the ${} syntax to essentially be like a pointer or an import of other
data structures. That is, an Ant equivalent of an XML reference. So
you could do this:

  <property name="basic-compile">
    <javac srcdir="${src.dir}"
           destdir="${build.classes}"
           debug="on"
           deprecation="off"
           optimize="on" />
  </property>

  <target name="main">
	<echo message="Running: ${basic-compile}"/>
	${basic-compile}
  </target>

In the <echo> case the "toString()" method is called. In the
stand-alone case it gets expanded into the underlying data structure.

I'm just thinking out loud here, so I don't really know if it is a
good idea or not, but just a thought.

sim

Mime
View raw message