Here's the targets i used... it requires ant-contrib though...
<mkdir dir="$/reports/flexcpd" /> <cpd minimumTokens="40" outputFile="reports/flexcpd/cpd.xml" sourceDirectory="$" />
Thanks for the reply.
I believe the target which you sent is for executing FlexCPD however it won't mark the build as failed in case there are code duplications. It will always finish as "BUILD SUCCESSFUL".
I was looking for something quick I could implement to have the build failed on code duplications.