ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@m64.com>
Subject RE: Ant2 and properties
Date Tue, 05 Dec 2000 09:50:20 GMT
Simeon,

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

Are you proposing making task a datatype? Hmmm... I am not sure about
that. We have discussed some form of template or macro facility and I
think, if such a facility is desirable, that would be the way to do what
you are talking about here.

>
>   <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.

Bouncing ideas around is good :-) I don't think we have envisaged this
as some form of parse time string replacement idea. More that at build
time, properties are named datatypes. Your approach above would be
difficult to parse without doing the property expansion at parse time.
We don't want to do that.

Conor



Mime
View raw message