Hi,
Also how can I get a list of all ant files?
We use this but this only includes files with targets not ones with only
properties.
Map targets = project.getTargets();
Iterator targetsIter = targets.values().iterator();
while (targetsIter.hasNext())
{
Target target = (Target) targetsIter.next();
String projectPath = target.getLocation().getFileName();
Thanks
> -----Original Message-----
> From: ext [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 13 November 2008 06:48
> To: [email protected]
> Subject: AW: Find a properties location
>
> While I think that could be implemented this is not at the moment.
> You have to introduce a new type for propertyvalues, containing the value
> and the location.
> You would change the api from
>
> Hashtable/*<String,String>*/ properties;
>
> to
>
> Hashtable<String,Property> properties;
> class Property {
> String value;
> Location location;
> }
>
> and change
>
> Project.setProperty(String name, String value)
> to
> Project.setProperty(String name, String value, Task settingTask)
>
> The last change is needed because somewhere the location has to be set.
>
>
> Jan
>
> >-----Ursprüngliche Nachricht-----
> >Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >Gesendet: Mittwoch, 12. November 2008 16:22
> >An: [email protected]
> >Betreff: RE: Find a properties location
> >
> >Hi,
> >
> >I not looking for the value of the property but where in the
> >configuration it is defined.
> >
> >The org.apache.tools.ant.Target class has a method:
> >getLocation(), can I get the same sort of thing for properties.
> >
> >Thanks
> >
> >> -----Original Message-----
> >> From: ext [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED]
> >> Sent: 12 November 2008 15:11
> >> To: [email protected]
> >> Subject: AW: Find a properties location
> >>
> >> Properties are a String-String-Mapping.
> >> Quasi a
> >> Hashtable<String,String> properties = ...
> >> The name works as key.
> >> The value is set by
> >> <property .. value=""/> : to the string value
> >> <property .. location=""/> : to the absolute path (again
> >as String) of
> >> that location.
> >>
> >>
> >> Jan
> >>
> >> >-----Ursprüngliche Nachricht-----
> >> >Von: [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED]
> >> >Gesendet: Mittwoch, 12. November 2008 15:32
> >> >An: [email protected]
> >> >Betreff: Find a properties location
> >> >
> >> >Hi,
> >> >
> >> >How can I find out where a property is defined, which ant file?
> >> >
> >> >I would like:
> >> >project.getProperty("helium.dir").file()
> >> >
> >> >or:
> >> >project.getProperty("helium.dir").location()
> >> >
> >> >Thanks
> >> >
> >> >
> >> >
> >>
> >>---------------------------------------------------------------------
> >> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> >For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]