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?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.