Ant not available by default for java projects on xenial

Looks like ant doesn’t come pre-installed on Xenial, despite the documentation 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:

addons:
  apt:
    packages:
      - ant

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.

Thanks again for reporting this issue.