Skip to content

Commit 00a9d5f

Browse files
committed
Sonar with plugin
1 parent 20e49b7 commit 00a9d5f

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
${{ runner.os }}-maven-
5656
5757
- name: Sonar
58-
run: mvn org.jacoco:jacoco-maven-plugin:prepare-agent verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=org.utplsql:utplsql-maven-plugin
58+
run: mvn sonar:sonar -Pcoverage -Dsonar.projectKey=org.utplsql:utplsql-maven-plugin
5959
env:
6060
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6161
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

pom.xml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
<jaxb.version>2.3.1</jaxb.version>
5959
<sonar.organization>utplsql</sonar.organization>
6060
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
61-
<sonar.jacoco.reportPath>${project.basedir}/target/jacoco.exec</sonar.jacoco.reportPath>
6261
</properties>
6362

6463
<dependencies>
@@ -245,6 +244,32 @@
245244
</build>
246245

247246
<profiles>
247+
<profile>
248+
<id>coverage</id>
249+
<build>
250+
<plugins>
251+
<plugin>
252+
<groupId>org.jacoco</groupId>
253+
<artifactId>jacoco-maven-plugin</artifactId>
254+
<version>0.8.5</version>
255+
<executions>
256+
<execution>
257+
<id>prepare-agent</id>
258+
<goals>
259+
<goal>prepare-agent</goal>
260+
</goals>
261+
</execution>
262+
<execution>
263+
<id>report</id>
264+
<goals>
265+
<goal>report</goal>
266+
</goals>
267+
</execution>
268+
</executions>
269+
</plugin>
270+
</plugins>
271+
</build>
272+
</profile>
248273
<profile>
249274
<id>release</id>
250275
<activation>

0 commit comments

Comments
 (0)