language: java

jdk:
 - oraclejdk8

before_install:
 - if [ ! -f "$HOME/apache-maven-3.3.9/bin/mvn" ]; then wget https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip && unzip -qq apache-maven-3.3.9-bin.zip -d $HOME; fi
 - export M2_HOME=$HOME/apache-maven-3.3.9
 - export PATH=$M2_HOME/bin:$PATH

deploy:
  provider: script
  script: mvn -Dmaven.test.skip=true -Prelease,gpg clean deploy --settings travis-settings.xml
  on:
    tags: true
    jdk: oraclejdk7

before_deploy:
  - openssl aes-256-cbc -K $encrypted_1a969067a27a_key -iv $encrypted_1a969067a27a_iv -in codesigning.asc.enc -out codesigning.asc -d
  - gpg --fast-import codesigning.asc

cache:
  directories:
    - $HOME/.m2
    - $HOME/apache-maven-3.3.9
language: java

jdk:
 - oraclejdk8

before_install:
 - if [ ! -f "$HOME/apache-maven-3.3.9/bin/mvn" ]; then wget https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip && unzip -qq apache-maven-3.3.9-bin.zip -d $HOME; fi
 - export M2_HOME=$HOME/apache-maven-3.3.9
 - export PATH=$M2_HOME/bin:$PATH

deploy:
  provider: script
  script: mvn -Dmaven.test.skip=true -Prelease,gpg clean deploy --settings travis-settings.xml
  on:
    tags: true
    jdk: oraclejdk8

before_deploy:
  - openssl aes-256-cbc -K $encrypted_1a969067a27a_key -iv $encrypted_1a969067a27a_iv -in codesigning.asc.enc -out codesigning.asc -d
  - gpg --fast-import codesigning.asc

cache:
  directories:
    - $HOME/.m2
    - $HOME/apache-maven-3.3.9
Switch to java 8 for deploy target
Switch to java 8 for deploy target
