Skip to content

Commit

Permalink
Add JaCoCo
Browse files Browse the repository at this point in the history
  • Loading branch information
longngn committed Aug 14, 2019
1 parent 21a5172 commit 7cb26cc
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 1 deletion.
12 changes: 12 additions & 0 deletions agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down
51 changes: 51 additions & 0 deletions code-coverage/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?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>
<artifactId>remoting-kafka-plugin</artifactId>
<groupId>io.jenkins.plugins.remoting-kafka</groupId>
<version>2.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>remoting-kafka-code-coverage</artifactId>
<name>Remoting Kafka Code Coverage</name>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>io.jenkins.plugins.remoting-kafka</groupId>
<artifactId>kafka-client-lib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins.remoting-kafka</groupId>
<artifactId>remoting-kafka-agent</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins.remoting-kafka</groupId>
<artifactId>remoting-kafka</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
17 changes: 17 additions & 0 deletions kafka-client-lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@
<version>2.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.apache.kafka</groupId>
Expand Down
20 changes: 19 additions & 1 deletion plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.48</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>io.jenkins.plugins.remoting-kafka</groupId>
Expand All @@ -16,9 +15,28 @@
<properties>
<jenkins.version>2.176.2</jenkins.version>
<slf4jVersion>1.7.26</slf4jVersion>
<jacoco.version>0.8.4</jacoco.version>
<java.level>8</java.level>
<useBeta>true</useBeta>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>io.jenkins.plugins.remoting-kafka</groupId>
Expand Down
18 changes: 18 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<parent>
<groupId>org.jenkins-ci</groupId>
<artifactId>jenkins</artifactId>
<!-- Should check for Surefire's argLine when updating parent POM version -->
<version>1.52</version>
</parent>

Expand All @@ -18,9 +19,25 @@
<properties>
<remoting.version>3.33</remoting.version>
<jenkins.version>2.176.2</jenkins.version>
<jacoco.version>0.8.4</jacoco.version>
<java.level>8</java.level>
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Override argLine in parent POM so JaCoCo can run -->
<!-- The latter part is copied from parent POM -->
<argLine>@{argLine} -Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

<licenses>
<license>
<name>MIT License</name>
Expand All @@ -32,6 +49,7 @@
<module>kafka-client-lib</module>
<module>agent</module>
<module>plugin</module>
<module>code-coverage</module>
</modules>

<scm>
Expand Down

0 comments on commit 7cb26cc

Please sign in to comment.