language: java
jdk:
  - oraclejdk8
before_script: "[[ $TRAVIS_PULL_REQUEST == \"false\" ]] && ./make_credentials.py"
script: 
  - find $HOME/.m2 -name "_remote.repositories" | xargs rm
  - find $HOME/.m2 -name "resolver-status.properties" | xargs rm -f
  
# If building master, Publish to Sonatype
after_success: "[[ $TRAVIS_PULL_REQUEST == \"false\" ]] && mvn deploy"

sudo: false

# Cache settings
cache:
  directories:
    - $HOME/.m2/repository

# whitelist
branches:
  only:
    - master
language: java
jdk:
  - oraclejdk8
before_script: |
  if ([ $TRAVIS_PULL_REQUEST = "false" ] && [ $TRAVIS_BRANCH = "master" ]); then
    ./make_credentials.py
  fi

script: 
  - find $HOME/.m2 -name "_remote.repositories" | xargs rm
  - find $HOME/.m2 -name "resolver-status.properties" | xargs rm -f
  
# If building master, Publish to Sonatype
after_success: |
  if ([ $TRAVIS_PULL_REQUEST = "false" ] && [ $TRAVIS_BRANCH = "master" ]); then
    mvn deploy
  fi

sudo: false

# Cache settings
cache:
  directories:
    - $HOME/.m2/repository

Make Travis available for all branches
Make Travis available for all branches
