language: java
# sudo: required

jdk:
  - openjdk8
#  - openjdk9
#  - openjdk10
  - openjdk11

install: echo $JAVA_HOME && which javac && mvn -B -fae install

after_success:
  # Installing Codacy code coverage reporter upload tool
  # This is a workaround until [this issue here](https://github.com/codacy/codacy-coverage-reporter/issues/49) is not solved.
  - wget https://github.com/codacy/codacy-coverage-reporter/releases/download/1.0.13/codacy-coverage-reporter-1.0.13-assembly.jar -O ccr.jar
  # Uploading Cobertura report to Codacy
  - java -cp ccr.jar com.codacy.CodacyCoverageReporter -l Java -r ./resteasy-spring-boot-starter/target/site/cobertura/coverage.xml --projectToken $CODACY_PROJECT_TOKEN
  # Deploying SNAPSHOT artifacts to Maven Central
#  - mvn -B -f ./resteasy-spring-boot-starter/pom.xml -s ./resteasy-spring-boot-starter/settings.xml -DskipTests=true -Dcobertura.skip deploy
