ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dick, Brian E." <>
Subject RE: PropertySet use in macro
Date Wed, 01 Sep 2004 17:20:06 GMT
A target can do it. Why can't a macro?

Here's another option that doesn't involve changing the way macros work.
I need some means of using a refid to access the Properties in a
PropertySet. Something like the following.

   <property name="foo1.p1" value="Hello"/>
   <property name="foo1.p2" value="World"/>

   <propertyset id="foo1.propset">
      <propertyref prefix="foo1"/>
      <mapper type="glob" from="foo1*" to="bar*"/>

   <target name="test">

In a macro it would look something like

   <macrodef name="test">
      <attribute name="refid"/>

-----Original Message-----
From: Dominique Devienne [] 
Sent: Wednesday, September 01, 2004 12:52 PM
To: Ant Users List
Subject: RE: PropertySet use in macro

> From: Matt Benson []
> That's big, without having read this followup let me
> go from what I got from your initial query:  You'd
> like to be able to automagically assign properties to
> <macrodef> attributes, right?  This is kind of insane
> but I sort of like it, especially given the fact that
> a <propertyset> can contain a <mapper>.  I might play
> with adding this unless Peter or someone else has a
> strong objection to its inclusion.

Hmmm, I don't think I like this idea. This is populating
the attributes of a task (or group of tasks) implicitly
from properties which can be defined anywhere, including
in external properties files.

It's a bit like <javac attributefile="" />

With that contains:
debug = true
listfiles = false

And automagically it's equivalent to

<javac debug="true" listfiles="false" />

Very obscure and weird in fact. No, I don't like it.
Not sure if I'd be -1 yet, but I'm pretty close.

Properties should be properties,
and task attributes task attributes. --DD

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message