I have a task like:
<target name="someTarget">
<concat destfile="someFile">
<string>someString</string>
<string>someOtherString</string>
</concat>
</target>
<target name="someOtherTarget">
<antcall target="someTarget">
<param name="myParam" value="myValue"></param>
</antcall>
<antcall target="someTarget">
</antcall>
</target>
How can I concatenate the someOtherString only if myParam was supplied when calling the someTarget target?
Without Ant extensions, just use conditional Ant execution:
If you don’t mind adding Ant extensions to your project, check out Ant-Contrib‘s If task.