Ant has several optional tasks, but one of the most basic and central to java-development, the junit test-framework, is missing completely from the optional.jar in gentoo. It really should be there. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Moving this again to java@gentoo.org, so everyone out there can help.
I don't think I agree. Indeed, junit is a must-have, but in the end, it's totally independent from ant. Additionally, emerging junit when ant was already installed should create a symbolic link in the ${ANT_HOME}/lib directory, thus enabling you to use the junit optional task. However, this does not appear to be working properly (see e.g. http://forums.gentoo.org/viewtopic.php?t=29411&highlight=ant+junit, http://forums.gentoo.org/viewtopic.php?t=92756&highlight=ant+junit, http://forums.gentoo.org/viewtopic.php?t=34106&highlight=ant+junit, and http://forums.gentoo.org/viewtopic.php?t=59185&highlight=ant+junit) According to one of the cited threads, when you execute ACCEPT_KEYWORDS="~x86" emerge ant junit JUnit should be enabled in ant. To summarise: the issue is not that Ant doesn't include must-have optional tasks. However, when supported utilities (such as junit, jdepend, etc.) are installed, Ant does not automatically make the associated optional tasks available.
*** This bug has been marked as a duplicate of 35921 ***