Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update pom file to generate sonarqube report #3372

Open
wants to merge 2 commits into
base: 7.7.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,20 @@
<doUpdate>false</doUpdate>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<id>generate-code-coverage-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

<resources>
Expand Down
59 changes: 59 additions & 0 deletions jacoco-aggregate-schema-registry/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<parent>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-parent</artifactId>
<version>7.7.2-0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>jacoco-aggregate-schema-registry</artifactId>
<packaging>pom</packaging>

<description>Aggregate Coverage Report for Multi-Module Project</description>

<dependencies>
<!-- Add dependencies for each module that you want to aggregate -->
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Add more modules as needed -->
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<!-- we do not want to create any jars for this module -->
<configuration>
<skipIfEmpty>true</skipIfEmpty>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
<!-- putting the aggregate report in parent target -->
<configuration>
<outputDirectory>${project.parent.build.directory}/site/jacoco/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
14 changes: 14 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<module>client-encryption-hcvault</module>
<module>client-encryption</module>
<module>benchmark</module>
<module>jacoco-aggregate-schema-registry</module>
</modules>

<properties>
Expand Down Expand Up @@ -568,6 +569,19 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

</build>
Expand Down
8 changes: 8 additions & 0 deletions service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ semaphore:
downstream_projects: ["kafka-rest", "ksql", "confluent-security-plugins", "kafka-connect-replicator", "ce-kafka-rest", "confluent-cloud-plugins", "schema-registry-plugins"]
git:
enable: true
sonarqube:
enable: true
languages:
- go
- java
- python
- javascript
code_artifact:
enable: true
package_paths:
Expand All @@ -24,4 +31,5 @@ code_artifact:
- maven-snapshots/maven/io.confluent/kafka-json-*
- maven-snapshots/maven/io.confluent/kafka-schema-*
- maven-snapshots/maven/io.confluent/kafka-avro-serializer
- maven-snapshots/maven/io.confluent/jacoco-aggregate-schema-registry
- pypi-internal/pypi//confluent-ci-tools
4 changes: 2 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sonar.coverage.exclusions=**/test/**/*,**/tests/**/*,**/mock/**/*,**/mocks/**/*,**/*mock*,**/*test*
sonar.coverage.jacoco.xmlReportPaths=**/jacoco.xml
sonar.exclusions=**/*.pb.*,**/mk-include/**/*
sonar.java.binaries=core
sonar.java.binaries=.
sonar.language=java
sonar.projectKey=schema-registry
sonar.sources=core
sonar.sources=.