# Build Failing when using ant for one of the project. Maven and Graddle is working fine

**URL:** <https://community.sonarsource.com/t/build-failing-when-using-ant-for-one-of-the-project-maven-and-graddle-is-working-fine/21000>\
**Category:** SonarQube Server / Community Build\
**Created:** [March 3, 2020, 12:33pm UTC](https://community.sonarsource.com/t/build-failing-when-using-ant-for-one-of-the-project-maven-and-graddle-is-working-fine/21000 "2020-03-03T12:33:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![satish.c](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@satish.c](https://community.sonarsource.com/u/satish.c)\
**Post date:** [March 3, 2020, 12:33pm UTC](https://community.sonarsource.com/t/build-failing-when-using-ant-for-one-of-the-project-maven-and-graddle-is-working-fine/21000/1 "2020-03-03T12:33:23Z")

</div>

Getting the below error

```
E:\Z_Build\Project_Workspace_8\ProHance_9.4.1\PHCache\build\BuildProductQube.xml:75: java.lang.IllegalStateException: Fail to download libraries from server
        at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:78)
        at org.sonar.runner.impl.Jars.download(Jars.java:57)
        at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:46)
        at org.sonar.runner.impl.JarDownloader.checkVersionAndDownload(JarDownloader.java:37)
        at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:71)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
        at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
        at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
        at org.sonar.runner.api.Runner.execute(Runner.java:100)
        at org.sonar.ant.SonarTask.launchAnalysis(SonarTask.java:53)
        at org.sonar.ant.SonarTask.execute(SonarTask.java:48)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
        at org.apache.tools.ant.Main.runBuild(Main.java:854)
        at org.apache.tools.ant.Main.startAnt(Main.java:236)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
        at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:72)
        ... 27 more
```

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [March 3, 2020, 12:38pm UTC](https://community.sonarsource.com/t/build-failing-when-using-ant-for-one-of-the-project-maven-and-graddle-is-working-fine/21000/2 "2020-03-03T12:38:30Z")

</div>

Hey there,

Are you using the latest version of the [Scanner for Ant](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-ant/)? What version of SonarQube are you using?

---

<div class="post-metadata">

**Author:** ![satish.c](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@satish.c](https://community.sonarsource.com/u/satish.c)\
**Post date:** [March 4, 2020, 4:35am UTC](https://community.sonarsource.com/t/build-failing-when-using-ant-for-one-of-the-project-maven-and-graddle-is-working-fine/21000/3 "2020-03-04T04:35:44Z")

</div>

Able to trouble shoot using the latest jar for Ant. We are now able to build with Ant.

Thank you !!
