cache:
  directories:
  - $HOME/.m2
language: java
jdk:
  - oraclejdk7
  - oraclejdk8
email:
  - ben.alex@acegi.com.au
install:
  - mvn -B -Pdeploy -DexcludeGroupIds=com.github.github -V dependency:go-offline
script:
  - mvn -B -Pdeploy -Dgpg.skip=true verify
after_success:
  - if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then bash <(curl -s https://codecov.io/bash); fi
  - if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then echo $GPG_KEY | base64 -d | gpg --batch --fast-import -; fi
  - if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then mvn -B -Pdeploy --settings .travis-settings.xml deploy; fi
  - if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then mvn -B -Pdeploy --settings .travis-settings.xml site-deploy; fi

cache:
  directories:
  - $HOME/.m2
language: java
jdk:
  - oraclejdk7
  - oraclejdk8
email:
  - ben.alex@acegi.com.au
install:
  - mvn -B -Pdeploy -DexcludeGroupIds=com.github.github -V dependency:go-offline
script:
  - mvn -B -Pdeploy -Dgpg.skip=true verify
after_success:
  - if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then bash <(curl -s https://codecov.io/bash); fi
  - if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then echo $GPG_KEY | base64 --decode | gpg --batch --fast-import -; fi
  - if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then mvn -B -Pdeploy --settings .travis-settings.xml deploy; fi
  - if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then mvn -B -Pdeploy --settings .travis-settings.xml site-deploy; fi

Use base64 --decode for OS X compatibility
Use base64 --decode for OS X compatibility
