Currently, commons-cli depends on dev-java/ant. The optional ant tasks are only used for the test target, which is only called with USE=junit. Therefore, the DEPEND should be changed from dev-java/ant to dev-java/ant-core, and dev-java/ant-tasks should be only used when USE=junit.
Fixed thanks for reporting.