dist: xenial
language: java
branches:
  only:
  - master
  - /^\d+\.\d+$/
cache:
  directories:
    - $HOME/.m2
before_cache:
  - rm -rf $HOME/.m2/repository/io/vertx/
before_install:
  - sudo apt-get update -qq
  - sudo apt-get install --only-upgrade openjdk-8-jdk
jobs:
  include:
    - stage: test
      name: "OpenJDK 8"
      jdk: openjdk8
      script: mvn -q clean verify -B
    - if: type != pull_request
      name: "OpenJDK 11"
      jdk: openjdk11
      script: mvn -q clean verify -B
    - stage: deploy
      name: "Deploy to Sonatype's snapshots repository"
      if: type != pull_request AND env(SONATYPE_NEXUS_USERNAME) IS present
      script: bash .travis.deploy.artifacts.sh
notifications:
  email:
    recipients:
      - secure: "WPD08VXoFxsyVGbosA/hSyrk1Nsq7nAMwcd6HEtH9mXerpiArzpD4wLSkKf8wtwxZFZJfgzv0KViFYu9yjk4OgsShi2ERaHroJKOGVlnNWTvLrUYmsjLzYTLeiFEGUbmGnc8W8U7dVGmLdkPz0jLyfoNR7r2j+gw136irsDf5Cg="
    on_success: always
    on_failure: always

dist: xenial
language: java
branches:
  only:
  - master
  - /^\d+\.\d+$/
cache:
  directories:
    - $HOME/.m2
before_cache:
  - rm -rf $HOME/.m2/repository/io/vertx/
before_install:
  - sudo apt-get update -qq
  - sudo apt-get install --only-upgrade openjdk-8-jdk
jobs:
  include:
    - stage: test
      name: "OpenJDK 8"
      jdk: openjdk8
      script: mvn -q clean verify -B
    - if: type != pull_request
      name: "OpenJDK 11"
      jdk: openjdk11
      script: mvn -q clean verify -B
    - stage: deploy
      jdk: openjdk8
      name: "Deploy to Sonatype's snapshots repository"
      if: type != pull_request AND env(SONATYPE_NEXUS_USERNAME) IS present
      script: bash .travis.deploy.artifacts.sh
notifications:
  email:
    recipients:
      - secure: "WPD08VXoFxsyVGbosA/hSyrk1Nsq7nAMwcd6HEtH9mXerpiArzpD4wLSkKf8wtwxZFZJfgzv0KViFYu9yjk4OgsShi2ERaHroJKOGVlnNWTvLrUYmsjLzYTLeiFEGUbmGnc8W8U7dVGmLdkPz0jLyfoNR7r2j+gw136irsDf5Cg="
    on_success: always
    on_failure: always

Use OpenJDK8 to deploy snapshots
Use OpenJDK8 to deploy snapshots
