# Running test on Java 6 with gradle 6.0.1 emit warning about multiple ant versions

**URL:** https://discuss.gradle.org/t/running-test-on-java-6-with-gradle-6-0-1-emit-warning-about-multiple-ant-versions/34375
**Category:** Help/Discuss
**Created:** [December 31, 2019, 3:22pm UTC](https://discuss.gradle.org/t/running-test-on-java-6-with-gradle-6-0-1-emit-warning-about-multiple-ant-versions/34375 "2019-12-31T15:22:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![aleroot](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/aleroot/32/8209_2.png) [@aleroot](https://discuss.gradle.org/u/aleroot)
#### Post date: [December 31, 2019, 3:22pm UTC](https://discuss.gradle.org/t/running-test-on-java-6-with-gradle-6-0-1-emit-warning-about-multiple-ant-versions/34375/1 "2019-12-31T15:22:49Z")

</div>

I’m compiling and testing my project with Java 6 even though I’m running latest gradle 6.0.1 on JVM 1.8. I’ve implemented something similar to [this example](https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation) in the documentation, the only thing is that I’m using ant integration, defining an ant task inside gradle in this way :

` ant.mytest(haltonfailure: false, fork: true, forkmode: 'once', jvm: javaExecutables.java) {`

but since I have to use ant version 1.9.x( because newer ant version 1.10.x are not compatible with java 6), i’m getting now this warning:

WARNING: multiple versions of ant detected in path for junit  
jar:file:/home/ale/.gradle/wrapper/dists/gradle-6.0.1-bin/1lxlpkiy24sb18odw96cp4ojv/gradle-6.0.1/lib/ant-1.10.7.jar!/org/apache/tools/ant/Project.class  
and jar:file:/home/ale/dev/common/lib/unittest/randomizedtesting-runner/ant-1.9.14.jar!/org/apache/tools/ant/Project.class

Is there a way to avoid loading the gradle wrapper dependency version of ant to be part of my ant task runner ? Any other way to avoid the warning ?
