На самом деле в документации по заданию JUnit есть несколько альтернатив:
Note: You must have junit.jar available. You can do one of:
Put both junit.jar and ant-junit.jar in ANT_HOME/lib.
Do not put either in ANT_HOME/lib, and instead include their locations in your CLASSPATH environment variable.
Add both JARs to your classpath using -lib.
Specify the locations of both JARs using a <classpath> element in a <taskdef> in the build file.
Leave ant-junit.jar in its default location in ANT_HOME/lib but include junit.jar in the <classpath> passed to <junit>. (since Ant 1.7)
РЕДАКТИРОВАТЬ
Это то, что вам нужно.
<junit
...
>
<classpath>
<pathelement location="/path/to/your/custom/junit-4.8.2.jar""/>
<path refid="your.other.classpath.dependencies" />
</classpath>
...
</junit>