| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| # use https://github.com/DanySK/Gravis-CI for Maven Builds on Windows |
| |
| # Java is not yet supported on Windows, so the build would block. |
| # You do not need any setup from Travis, use a plain bash build |
| language: bash |
| # Enable them all, if you need them. |
| os: |
| - linux |
| # - osx |
| - windows |
| env: |
| global: |
| # This is a convenience variable for shortening download commands |
| - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" |
| - MAVEN_VERSION="3.6.3" |
| # If you use Windows, you may want to disable Windows Defender. It slows down the builds |
| # dramatically, also during cache setup. From a Tanzinul Islam's idea: http://bit.ly/348VPYS, |
| # This work around disables it before caching |
| - NO_WIN_DEFENDER=$(curl "${GRAVIS}.disable-windows-defender.sh" --output .no-defender.sh && source .no-defender.sh) |
| matrix: |
| # List any JDK you want to build your software with. |
| # You can see the list of supported environments by installing Jabba and using ls-remote: |
| # https://github.com/shyiko/jabba#usage |
| # Partial versions are allowed. They are dynamically resoved by launching jabba ls-remote, |
| # filtering for the provided JDK string, then picking the *first* match. This is useful if |
| # the intent is to target the latest release of some Java major release, or if the latest |
| # available build differs among platforms. |
| - JDK="adopt@1.8" |
| - JDK="adopt@1.11" |
| - JDK="adopt@1.14" |
| jobs: |
| # for Java11 with linux include only one job which does sonar analysis as well as regular build |
| include: |
| - os: linux |
| env: |
| - JDK="adopt@1.11" |
| - SONARQUBE_EXECUTION=true |
| exclude: |
| - os: linux |
| env: JDK="adopt@1.11" |
| addons: |
| sonarcloud: |
| organization: "apache" |
| token: |
| secure: "ftYinXGsk1HWv4lo6Iy/xIVO6ez/LYTF8Wv4VTPPsoJOU39Q78g9XusWqIiBSi3bKimrRD7U1oP5mVUGUafE2/8gaPSEnIHnAmUGdhQTMhtV1Ly97HOZfxj74vAb5gqXkT08GTaU0Juy1kcoLvG6AbxlQJEpqezgP/+yHley8VyFxx8b7y74xTJreZoD/LP1VM/rqXPA0q7199A7SnDteYtXLhHzib+GJ/xfOfwXzova3xIy24cThd15ZrOb18LYWrjs+21S049gQFXRFplKS1+fONz/khLpRrM2KeU+nMn8WWHkgjD7pZzP2hsT8eU7xN2XI3l821Dtbey715oyJhkqJwrt1qb0faPSstWANF74PB9HOeE13h+cUGTp+T0gGgsgXtkbvIQX2wC6I80k73GDwIMYrjjSfaBwtqfLOdHL9qm3fBBoq8f7ZYJjiOCcFgdbKWlo5APa0rIon4kkLzrQPgZtwiSKcW9GSVqEl6iQvxAZaLfgFuxLa7LP56HNz4uSPeXRXn737vUdMoNXIFGflA2P3zRFUcIXRAmfzqAU4w3EIYnYbTTpAOHEkjIg/SmRvxJ5I9zmzhCpIsEQIUFI4bSfzA8BrejhSU230hcvdsfWSBZbPbal4nrSFeUVliXciBLgcvfbPRam6Yv+nL0KGaZn0NZPwzngFh9tcM8=" |
| before_install: |
| # Download the script |
| - curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh |
| # Download, install, configue the JDK, and export the configuration to the current shell |
| - source ~/.install-jdk-travis.sh |
| - curl "${GRAVIS}.install-maven.sh" --output ~/.install-maven.sh |
| # Download, install, configue the JDK, and export the configuration to the current shell |
| - source ~/.install-maven.sh |
| # This is your main script |
| script: |
| - | |
| if [ "$SONARQUBE_EXECUTION" == "true" ]; then |
| mvn clean verify sonar:sonar -B -Pjacoco-report -Dsonar.projectKey=apache_jackrabbit-filevault-package-maven-plugin |
| else |
| mvn clean verify -B |
| fi |
| # If you use Gradle, cleanup the build cache from lock/temporary files |
| before_cache: |
| #- curl "${GRAVIS}.clean_gradle_cache.sh" --output ~/.clean_gradle_cache.sh |
| #- bash ~/.clean_gradle_cache.sh |
| cache: |
| directories: |
| # This avoids re-downloading the JDK every time, but Travis recommends not to do it |
| # - $HOME/.jabba/ |
| # Cache Maven repo |
| #- $HOME/.m2 |