I\'ve got an ant build script which I should modify. Specifically I should make a subversion checkout conditional: currently only the trunk gets checked out, the new version
You could define a wrapper target which depends on two other targets - one of which does trunk checkout, the other of which does branch checkout - and each of which is conditional on existence of your optional branch property.
You could further abstract the exec call into a macrodef to which you pass the trunk or branch url.
For example:
Output with no branch property defined:
do-svn-trunk-checkout:
[echo] svn-url=http://t01/svn/java/trunk
do-svn-branch-checkout:
do-svn-checkout:
Output with branch property defined:
do-svn-trunk-checkout:
do-svn-branch-checkout:
[echo] svn-url=http://t01/svn/hlfg/HLFG/java/branch/mybranch
do-svn-checkout: