ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Cody <paul.c...@lucida.com>
Subject RE: Iterating through properties
Date Fri, 22 Feb 2002 22:26:31 GMT
For diagnostic purposes, use ant -debug.  Otherwise it's about a 10 line
custom Task, so you may want to consider writing it for your project.

Paul

class MyTask extends Task {
    public void execute throws BuildException {
        Enumeration keys = project.getProperties().keys();
        String key;
        while (keys.hasMoreElements()) {
            key = keys.nextElement();
            doSomething(key, project.getProperty(key));
        }
    }
}

> -----Original Message-----
> From: Gordon Rose [mailto:Gordon@ActiveCert.com]
> Sent: Friday, February 22, 2002 9:26 AM
> To: Ant Users List
> Subject: Iterating through properties
> 
> 
> Hi,
> 
> Anyone know of a way to, for diagnostic purposes, iterate 
> through all properties in ant -- a for each, essentially. 
> I've seen iteration/for each solutions in the group. Anyone 
> apply these ideas to properties? Thanks much,
> 
> Gordon
> 

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message