Search code examples
svnantbuild.xmlmanifest.mf

Pass output of a target as a value


Is it possible to pass the output of an ant target as the value of something else? Such as:

<target name="svnrevision">
        <exec executable="svnversion" outputproperty="svnversion" />
    </target>

<target name="jar">
        ...
            <manifest>
                <attribute name="irrelevant" value="${svnversion}"/>
            </manifest> 
    </target>

Where ${svnversion} would be something like 12345.


Solution

  • Try adding a dependency between he targets

    <target name="jar" depends="svnversion">