To extend the answer to @Nim, complex commands can be generated using arg tags:
<exec executable="/usr/bin/git" outputproperty="git.branch"> <arg value="rev-parse"/> <arg value="--abbrev-ref"/> <arg value="HEAD"/> </exec>
This can be referenced later, for example:
<attribute name="Git-Branch" value="${git.branch}"/>
source share