Search code examples
antproperties

Set ant property by invoking a shell script?


Is there any way to set an ant property by capturing the output of a shellscript? (or another ant task)

Something like this:

<property name="foo">
    <value>
        <exec executable="bar" />
    </value>
</property>

Thanks!


Solution

  • It seems that exec task has an outputproperty-property, like so:

    <exec executable="bar" outputproperty="foo" />