Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I exclude ant testing?

I am trying to build a relatively simple java project on TravisCI but it keeps failing because the default Java build configurations include Ant testing.

My .travis.yml is quite minimal, as you can see:

language: java

However, when TravisCI runs it, I get an ant-related error, as seen in the end of my build log:

[0K$ ant test
Buildfile: build.xml does not exist!
Build failed
travis_time:end:173ed83c:start=1439310746598741958,finish=1439310746782527658,duration=183785700
[0K
[31;1mThe command "ant test" exited with 1.[0m

Done. Your build exited with 1.

I've searched for how to exclude but just adding an exclude like this doesn't seem to work.

language: java
    exclude: 
           -ant

Does anybody know how to exclude ant-related tests?

like image 767
Maslor Avatar asked Dec 09 '25 07:12

Maslor


1 Answers

Seems like you should use script directive:

  matrix:
  - JOB="./gradlew build"

script: "$JOB"

or

before_install:
  - cd java

The reason for that is ant pre installed on travis

like image 168
Andy Avatar answered Dec 10 '25 21:12

Andy