Is there a way to get the jobname for the current build in jenkins and pass it as a parameter to an ant build script?
Jenkins sets some environment variables such as JOB_NAME (see here) for more details on the variables set.
JOB_NAME
You can then access these in ant via ${env.JOB_NAME}.
${env.JOB_NAME}
Edit: There's also a little howto for environment variables on the same page here.