File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88cache :
99 directories :
1010 - $HOME/.m2
11+
12+ script :
13+ - mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Dsonar.projectKey=switcher-client-java
Original file line number Diff line number Diff line change 6161 <!-- Sonar -->
6262 <sonar .java.coveragePlugin>jacoco</sonar .java.coveragePlugin>
6363 <sonar .dynamicAnalysis>reuseReports</sonar .dynamicAnalysis>
64- <sonar .jacoco.reportPath>${project.basedir} /../ target/jacoco.exec</sonar .jacoco.reportPath>
64+ <sonar .jacoco.reportPath>${project.basedir} /target/coverage-reports/ jacoco-unit .exec</sonar .jacoco.reportPath>
6565 <sonar .language>java</sonar .language>
6666 </properties >
6767
172172 <filtering >true</filtering >
173173 </resource >
174174 </resources >
175-
176- <plugins >
175+
176+ <plugins >
177177 <!-- Tells Sonar to pick up testing results -->
178- <plugin >
179- <groupId >org.jacoco</groupId >
180- <artifactId >jacoco-maven-plugin</artifactId >
181- <configuration >
182- <destFile >${sonar.jacoco.reportPath} </destFile >
183- <append >true</append >
184- </configuration >
185- <executions >
186- <execution >
187- <id >agent</id >
188- <goals >
189- <goal >prepare-agent</goal >
190- </goals >
191- </execution >
192- </executions >
193- </plugin >
178+ <plugin >
179+ <groupId >org.jacoco</groupId >
180+ <artifactId >jacoco-maven-plugin</artifactId >
181+ <configuration >
182+ <destFile >${sonar.jacoco.reportPath} </destFile >
183+ <dataFile >${sonar.jacoco.reportPath} </dataFile >
184+ <append >true</append >
185+ </configuration >
186+ <executions >
187+ <execution >
188+ <id >jacoco-initialize</id >
189+ <goals >
190+ <goal >prepare-agent</goal >
191+ </goals >
192+ </execution >
193+ <execution >
194+ <id >jacoco-site</id >
195+ <phase >package</phase >
196+ <goals >
197+ <goal >report</goal >
198+ </goals >
199+ </execution >
200+ </executions >
201+ </plugin >
194202
195203 <!-- Generate and sign all artifacts
196204 <plugin>
Original file line number Diff line number Diff line change 1+ sonar.language =java
2+ sonar.profile =petruki
3+ sonar.sourceEncoding =UTF-8
4+
5+ sonar.projectKey =switcher-client-java
6+ sonar.projectName =Switcher Client
7+ sonar.projectVersion =1.0.1
8+ sonar.sources =src/main/java
9+ sonar.tests =src/test/java
10+ sonar.binaries =target/
11+
12+ # sonar.java.coveragePlugin=jacoco
13+ # sonar.dynamicAnalysis=true
14+ sonar.jacoco.reportPath =target/coverage-reports/jacoco-unit.exec
15+
16+ sonar.java.coveragePlugin =jacoco
17+ sonar.dynamicAnalysis =reuseReports
18+ sonar.surefire.reportsPath =target/surefire-reports
You can’t perform that action at this time.
0 commit comments