Currently the JUnit and JUnitReport tasks do not support JUnit5. Unfortunately the JUnit project does not provide JUnit5 tasks for Apache Ant either. Please bring the flexibility and robustness of Ant to JUnit5 by supporting it with Ant tasks.
Some work has started to support it https://www.mail-archive.com/dev@ant.apache.org/msg46315.html
This is good news. Thank you very much!
An initial version of this support will be available in 1.10.3 release of Ant. A new "junitlauncher" task has been introduced to support this. More about the task can be read in the junitlauncher task manual. This task will be enhanced in future releases of Ant, to include support for fork mode and such. P.S: A release candidate for 1.10.3 of Ant is now available which has this support. If you are interested in trying this out against the release candidate, follow this mailing list thread https://www.mail-archive.com/user@ant.apache.org/msg42753.html and report any issues in the user mailing list.