From bc500362d374fc98ebe91adeff14fad01ef685fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Sun, 13 Oct 2019 17:24:03 +0300 Subject: [PATCH 1/4] #996 Update Travis config --- .sonarcloud.properties | 38 -------------------------------------- .travis.yml | 17 ++++++++++------- 2 files changed, 10 insertions(+), 45 deletions(-) delete mode 100644 .sonarcloud.properties diff --git a/.sonarcloud.properties b/.sonarcloud.properties deleted file mode 100644 index c6b26bf5df8b..000000000000 --- a/.sonarcloud.properties +++ /dev/null @@ -1,38 +0,0 @@ -# -# The MIT License -# Copyright © 2014-2019 Ilkka Seppälä -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -# - -# Path to sources -#sonar.sources=. -#sonar.exclusions= -#sonar.inclusions= - -# Path to tests -#sonar.tests= -#sonar.test.exclusions= -#sonar.test.inclusions= - -# Source encoding -#sonar.sourceEncoding=UTF-8 - -# Exclusions for copy-paste detection -#sonar.cpd.exclusions= diff --git a/.travis.yml b/.travis.yml index 45323dcfd457..2b28a8eb2767 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ language: java -dist: xenial +dist: bionic jdk: - openjdk11 +sudo: required env: global: @@ -12,12 +13,16 @@ env: services: - xvfb -# default install command is just "mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V" -install: -- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -e +addons: + sonarcloud: + organization: "iluwatar" + token: + secure: "FpHwMYPMkdWU6CeIB7+O3qIeIM4vJMp47UjkKK53f0w0s6tPZofZZkab+gcL2TqKSil7sFVB/AQXU1cUubflRszwcLbNsc8H2yFehD79o0o0Mqd1Dd5ip/q0KQbHkkln+InFlVLfvrLB4Xd4mlQVxbGhqpULBhXjKzFzQlRFcuU=" +script: + # the following command line builds the project, runs the tests with coverage and then execute the SonarCloud analysis + - mvn clean verify sonar:sonar -Pcoverage -Dsonar.projectKey=iluwatar_java-design-patterns after_success: -- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN - bash update-ghpages.sh notifications: @@ -29,5 +34,3 @@ notifications: on_success: change # options: [always|never|change] default: always on_failure: always # options: [always|never|change] default: always on_start: never # options: [always|never|change] default: always - -sudo: required From 1564562a40eab0a68b75672c22263b992f332d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Sun, 13 Oct 2019 17:51:32 +0300 Subject: [PATCH 2/4] #996 Remove old secret --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2b28a8eb2767..4a5e629f27d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,6 @@ env: global: - GH_REF: github.com/iluwatar/java-design-patterns.git - secure: LxTDuNS/rBWIvKkaEqr79ImZAe48mCdoYCF41coxNXgNoippo4GIBArknqtv+XvdkiuRZ1yGyj6pn8GU33c/yn+krddTUkVCwTbVatbalW5jhQjDbHYym/JcxaK9ZS/3JTeGcWrBgiPqHEEDhCf26vPZsXoMSeVCEORVKTp1BSg= - - secure: "eoWlW9GyTJY04P8K3pxayXwU9/hmptQg/LfirispQkV9YvmziCfSzXnatnBhNfud98sCzY8BScXnb+OWLTnjLKpId4rtEqb0aJ40Jc32cUKzgzFAUn7cNcDAbUIfyPAGVqyQqfj/11wYSADwWMMOPlW97ExUtoyiH2WenXuRHso=" services: - xvfb From c4adab2cb7bc0cb059a9f0ec76d6b99701ac910d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Sun, 13 Oct 2019 21:48:15 +0300 Subject: [PATCH 3/4] #996 add coverage profile --- pom.xml | 74 ++++++++++++++++++++++----------------------------------- 1 file changed, 29 insertions(+), 45 deletions(-) diff --git a/pom.xml b/pom.xml index 4ed357181a12..7616f9a6af76 100644 --- a/pom.xml +++ b/pom.xml @@ -353,37 +353,6 @@ - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.jacoco - - jacoco-maven-plugin - - - [0.6.2,) - - - prepare-agent - - - - - - - - - - org.apache.maven.plugins maven-compiler-plugin @@ -410,20 +379,6 @@ - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - prepare-agent - - prepare-agent - - - - - @@ -474,6 +429,35 @@ + + + coverage + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + prepare-agent + + prepare-agent + + + + report + + report + + + + + + + + + From a8fc1dc6637cf35d2cca6af159afb295451c36c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Sun, 13 Oct 2019 22:53:42 +0300 Subject: [PATCH 4/4] #996 move jacoco out of profile --- .travis.yml | 2 +- pom.xml | 50 +++++++++++++++++++++----------------------------- 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a5e629f27d1..6cd971428327 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ addons: secure: "FpHwMYPMkdWU6CeIB7+O3qIeIM4vJMp47UjkKK53f0w0s6tPZofZZkab+gcL2TqKSil7sFVB/AQXU1cUubflRszwcLbNsc8H2yFehD79o0o0Mqd1Dd5ip/q0KQbHkkln+InFlVLfvrLB4Xd4mlQVxbGhqpULBhXjKzFzQlRFcuU=" script: # the following command line builds the project, runs the tests with coverage and then execute the SonarCloud analysis - - mvn clean verify sonar:sonar -Pcoverage -Dsonar.projectKey=iluwatar_java-design-patterns + - mvn clean verify sonar:sonar -Dsonar.projectKey=iluwatar_java-design-patterns after_success: - bash update-ghpages.sh diff --git a/pom.xml b/pom.xml index 7616f9a6af76..d6cd3a6e60c3 100644 --- a/pom.xml +++ b/pom.xml @@ -426,38 +426,30 @@ + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + prepare-agent + + prepare-agent + + + + report + + report + + + + + - - - coverage - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - prepare-agent - - prepare-agent - - - - report - - report - - - - - - - - -