Skip to content

Commit 72b1746

Browse files
authored
iluwatar#996 Fix SonarCloud analysis failure (iluwatar#997)
* iluwatar#996 Update Travis config * iluwatar#996 Remove old secret * iluwatar#996 add coverage profile * iluwatar#996 move jacoco out of profile
1 parent 9ebbc42 commit 72b1746

File tree

3 files changed

+31
-91
lines changed

3 files changed

+31
-91
lines changed

.sonarcloud.properties

Lines changed: 0 additions & 38 deletions
This file was deleted.

.travis.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
language: java
2-
dist: xenial
2+
dist: bionic
33
jdk:
44
- openjdk11
5+
sudo: required
56

67
env:
78
global:
89
- GH_REF: github.com/iluwatar/java-design-patterns.git
910
- secure: LxTDuNS/rBWIvKkaEqr79ImZAe48mCdoYCF41coxNXgNoippo4GIBArknqtv+XvdkiuRZ1yGyj6pn8GU33c/yn+krddTUkVCwTbVatbalW5jhQjDbHYym/JcxaK9ZS/3JTeGcWrBgiPqHEEDhCf26vPZsXoMSeVCEORVKTp1BSg=
10-
- secure: "eoWlW9GyTJY04P8K3pxayXwU9/hmptQg/LfirispQkV9YvmziCfSzXnatnBhNfud98sCzY8BScXnb+OWLTnjLKpId4rtEqb0aJ40Jc32cUKzgzFAUn7cNcDAbUIfyPAGVqyQqfj/11wYSADwWMMOPlW97ExUtoyiH2WenXuRHso="
1111

1212
services:
1313
- xvfb
1414

15-
# default install command is just "mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V"
16-
install:
17-
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -e
15+
addons:
16+
sonarcloud:
17+
organization: "iluwatar"
18+
token:
19+
secure: "FpHwMYPMkdWU6CeIB7+O3qIeIM4vJMp47UjkKK53f0w0s6tPZofZZkab+gcL2TqKSil7sFVB/AQXU1cUubflRszwcLbNsc8H2yFehD79o0o0Mqd1Dd5ip/q0KQbHkkln+InFlVLfvrLB4Xd4mlQVxbGhqpULBhXjKzFzQlRFcuU="
20+
script:
21+
# the following command line builds the project, runs the tests with coverage and then execute the SonarCloud analysis
22+
- mvn clean verify sonar:sonar -Dsonar.projectKey=iluwatar_java-design-patterns
1823

1924
after_success:
20-
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN
2125
- bash update-ghpages.sh
2226

2327
notifications:
@@ -29,5 +33,3 @@ notifications:
2933
on_success: change # options: [always|never|change] default: always
3034
on_failure: always # options: [always|never|change] default: always
3135
on_start: never # options: [always|never|change] default: always
32-
33-
sudo: required

pom.xml

Lines changed: 21 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -353,37 +353,6 @@
353353
<build>
354354
<pluginManagement>
355355
<plugins>
356-
<!-- This plugin's configuration is used to store Eclipse m2e settings
357-
only. It has no influence on the Maven build itself. TODO: Remove when the
358-
m2e plugin can correctly bind to Maven lifecycle -->
359-
<plugin>
360-
<groupId>org.eclipse.m2e</groupId>
361-
<artifactId>lifecycle-mapping</artifactId>
362-
<version>1.0.0</version>
363-
<configuration>
364-
<lifecycleMappingMetadata>
365-
<pluginExecutions>
366-
<pluginExecution>
367-
<pluginExecutionFilter>
368-
<groupId>org.jacoco</groupId>
369-
<artifactId>
370-
jacoco-maven-plugin
371-
</artifactId>
372-
<versionRange>
373-
[0.6.2,)
374-
</versionRange>
375-
<goals>
376-
<goal>prepare-agent</goal>
377-
</goals>
378-
</pluginExecutionFilter>
379-
<action>
380-
<ignore/>
381-
</action>
382-
</pluginExecution>
383-
</pluginExecutions>
384-
</lifecycleMappingMetadata>
385-
</configuration>
386-
</plugin>
387356
<plugin>
388357
<groupId>org.apache.maven.plugins</groupId>
389358
<artifactId>maven-compiler-plugin</artifactId>
@@ -410,20 +379,6 @@
410379
</pluginManagement>
411380

412381
<plugins>
413-
<plugin>
414-
<groupId>org.jacoco</groupId>
415-
<artifactId>jacoco-maven-plugin</artifactId>
416-
<version>${jacoco.version}</version>
417-
<executions>
418-
<execution>
419-
<id>prepare-agent</id>
420-
<goals>
421-
<goal>prepare-agent</goal>
422-
</goals>
423-
</execution>
424-
</executions>
425-
</plugin>
426-
427382
<!--checkstyle plug-in. checking against googles styles
428383
see config at checkstyle.xml
429384
-->
@@ -471,6 +426,27 @@
471426
</execution>
472427
</executions>
473428
</plugin>
429+
430+
<plugin>
431+
<groupId>org.jacoco</groupId>
432+
<artifactId>jacoco-maven-plugin</artifactId>
433+
<version>${jacoco.version}</version>
434+
<executions>
435+
<execution>
436+
<id>prepare-agent</id>
437+
<goals>
438+
<goal>prepare-agent</goal>
439+
</goals>
440+
</execution>
441+
<execution>
442+
<id>report</id>
443+
<goals>
444+
<goal>report</goal>
445+
</goals>
446+
</execution>
447+
</executions>
448+
</plugin>
449+
474450
</plugins>
475451
</build>
476452

0 commit comments

Comments
 (0)