language: java

sudo: true

before_cache:
- rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
  directories:
  - $HOME/.gradle/caches/
  - $HOME/.gradle/wrapper/

services:
- docker

jdk:
- oraclejdk7
- openjdk7
- oraclejdk8

before_install:
# We have to change the hostname to work around a bug in openjdk7 that crashes when the hostname is
# too long.
- export OLD_HOSTNAME=`hostname` && sudo sed -i -e "s/$OLD_HOSTNAME/test/g" /etc/hosts && sudo hostname test

# Don't run eval ./gradlew assemble"
install:
- ./gradlew examples:geoserverData

script:
- ./gradlew build

after_failure:
- cat core/build/reports/checkstyleReports/main.xml
- cat core/build/reports/findbugsReports/main.xml
- cat core/build/reports/tests/index.html
- sh travis/print-examples-test-output.sh

deploy:
- provider: script
  script: travis/publish.sh
  skip_cleanup: true
  on:
    repo: mapfish/mapfish-print
    java: oraclejdk7

language: java

sudo: true

before_cache:
- rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
  directories:
  - $HOME/.gradle/caches/
  - $HOME/.gradle/wrapper/

services:
- docker

jdk:
- oraclejdk7
- openjdk7
- oraclejdk8

before_install:
# We have to change the hostname to work around a bug in openjdk7 that crashes when the hostname is
# too long.
- export OLD_HOSTNAME=`hostname` && sudo sed -i -e "s/$OLD_HOSTNAME/test/g" /etc/hosts && sudo hostname test

# Don't run eval ./gradlew assemble"
install:
- ./gradlew examples:geoserverData

script:
- git --no-pager diff --check `git log --oneline | tail -1 | cut --fields=1 --delimiter=' '`
- ./gradlew build

after_failure:
- cat core/build/reports/checkstyleReports/main.xml
- cat core/build/reports/findbugsReports/main.xml
- cat core/build/reports/tests/index.html
- sh travis/print-examples-test-output.sh

deploy:
- provider: script
  script: travis/publish.sh
  skip_cleanup: true
  on:
    repo: mapfish/mapfish-print
    java: oraclejdk7

Add git attribute check on Travis
Add git attribute check on Travis
