You must parameterize your assembly by tag / branch name. The easiest way to do this is to add a parameter (e.g. SVN_BRANCH_DIR) to your Jenkins job, which will have values like trunk , branches/branch1 , tags/sometag .
Now, if you use the Jenkins ANT build step, this parameter will be automatically passed to your ANT script as a property (via the ANT -D option). Thus, you can use ${SVN_BRANCH_DIR} in it (for example, svn://myserver/myrepo/${SVN_BRANCH_DIR} ).
 source share