# Ant not available by default for java projects on xenial

**URL:** <https://travis-ci.community/t/ant-not-available-by-default-for-java-projects-on-xenial/4468>\
**Category:** Xenial\
**Tags:** java\
**Created:** [July 31, 2019, 2:05pm UTC](https://travis-ci.community/t/ant-not-available-by-default-for-java-projects-on-xenial/4468 "2019-07-31T14:05:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nigelmegitt](https://avatars.discourse-cdn.com/v4/letter/n/0ea827/32.png) [@nigelmegitt](https://travis-ci.community/u/nigelmegitt)\
**Post date:** [July 31, 2019, 2:05pm UTC](https://travis-ci.community/t/ant-not-available-by-default-for-java-projects-on-xenial/4468/1 "2019-07-31T14:05:03Z")

</div>

Looks like ant doesn’t come pre-installed on Xenial, despite the [documentation](https://docs.travis-ci.com/user/languages/java#projects-using-ant) for Travis CI saying that running ant on a Java project is the _default_ option!

A workaround is to add to the `.travis.yml` file:

```auto
addons:
  apt:
    packages:
      - ant

```

---

<div class="post-metadata">

**Author:** ![dominic](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dominic/32/14_2.png) [@dominic](https://travis-ci.community/u/dominic)\
**Post date:** [July 31, 2019, 6:02pm UTC](https://travis-ci.community/t/ant-not-available-by-default-for-java-projects-on-xenial/4468/2 "2019-07-31T18:02:30Z")

</div>

Thanks for reaching out and sorry for this issue.

We acknowledge `ant` doesn’t come pre-installed on our Xenial image at this time.

We’ll look into fixing it at the image level but you’ll need to install it manually as you are currently doing in the meantime.

We have added a note about this in our docs in the meantime. See [https://docs.travis-ci.com/user/languages/java#using-ant-on-ubuntu-xenial-1604](https://docs.travis-ci.com/user/languages/java#using-ant-on-ubuntu-xenial-1604).

Thanks again for reporting this issue.
