Peter Vogel wrote:
Sounds interesting. This is just the kind of task that could be in a "taskdefs.org" library of contributed optional tasks, IMO.Before I go and do this, I'm wondering if I'm just missing something.
What I'm looking for is the ability to execute a process and store its output in a property, for example:
<property name="build" exec="cleartool describe -attr buildnum ${ant.file}"/>
Or, if you prefer:
<property name="build">
<exec executable="cleartool"> <arg line="describe -attr buildnum ${ant.file}"/>
</exec>
</property>
Or perhaps?
<target name="init">
<exec executable="cleartool" property="build"> <arg line="describe -attr buildnum ${ant.file}"/>
</exec>
</property>
This seems like a pretty obvious bit of functionality to have, so I'm
surprised I
didn't see it already. I'll implement if someone suggests the preferred
syntax for this.
-Peter
Most of us would never need it, but for those few-- it could be quite valuable.
However, as a quick and dirty solution:
Try executing the process, recording its output in a file, converting that into java.util.Properties format, and then
reading it in as a property file (e.g. <Property file="foo" /> )
HTH,
--Craeg Strong
--
Craeg K. Strong | www.arielpartners.com
Ariel Partners LLC | [EMAIL PROTECTED] 85 River Street, Ste. 3A | Fax: (781) 647-9690
Waltham, MA 02453 | Voice: (781) 647-2425
