Skip to content

Commit 4fdff44

Browse files
committed
Add code coverage reporting
1 parent b1466b0 commit 4fdff44

File tree

3 files changed

+90
-6
lines changed

3 files changed

+90
-6
lines changed

build-tools/src/main/resources/weblogic-kubernetes-operator/checkstyle/customized_google_checks.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
<property name="tokens"
5454
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
5555
</module>
56-
<module name="NeedBraces"/>
5756
<module name="LeftCurly"/>
5857
<module name="RightCurly">
5958
<property name="id" value="RightCurlySame"/>
@@ -192,10 +191,9 @@
192191
<module name="OverloadMethodsDeclarationOrder"/>
193192
<module name="VariableDeclarationUsageDistance"/>
194193
<module name="CustomImportOrder">
195-
<property name="specialImportsRegExp" value="com.oracle"/>
196194
<property name="sortImportsInGroupAlphabetically" value="true"/>
197195
<property name="separateLineBetweenGroups" value="true"/>
198-
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
196+
<property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE"/>
199197
</module>
200198
<module name="MethodParamPad"/>
201199
<module name="NoWhitespaceBefore">
@@ -254,5 +252,4 @@
254252
</module>
255253
<module name="CommentsIndentation"/>
256254
</module>
257-
</module>
258-
255+
</module>

buildtime-reports/pom.xml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>operator-parent</artifactId>
7+
<groupId>oracle.kubernetes</groupId>
8+
<version>2.1-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>buildtime-reports</artifactId>
13+
<packaging>pom</packaging>
14+
<name>Project Reports</name>
15+
16+
<profiles>
17+
<profile>
18+
<id>reports</id>
19+
<activation>
20+
<property>
21+
<name>!no-reports</name>
22+
</property>
23+
</activation>
24+
<build>
25+
<plugins>
26+
<plugin>
27+
<groupId>org.jacoco</groupId>
28+
<artifactId>jacoco-maven-plugin</artifactId>
29+
<version>${jacoco.version}</version>
30+
<executions>
31+
<execution>
32+
<phase>verify</phase>
33+
<goals>
34+
<goal>report-aggregate</goal>
35+
</goals>
36+
</execution>
37+
</executions>
38+
</plugin>
39+
</plugins>
40+
</build>
41+
</profile>
42+
</profiles>
43+
44+
<dependencies>
45+
<dependency>
46+
<groupId>${project.groupId}</groupId>
47+
<artifactId>operator-model</artifactId>
48+
<version>${project.version}</version>
49+
</dependency>
50+
<dependency>
51+
<groupId>${project.groupId}</groupId>
52+
<artifactId>weblogic-kubernetes-operator</artifactId>
53+
<version>${project.version}</version>
54+
</dependency>
55+
<dependency>
56+
<groupId>${project.groupId}</groupId>
57+
<artifactId>operator-integration-tests</artifactId>
58+
<version>${project.version}</version>
59+
</dependency>
60+
</dependencies>
61+
</project>

pom.xml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<module>kubernetes</module>
1919
<module>json-schema-maven-plugin</module>
2020
<module>json-schema</module>
21+
<module>buildtime-reports</module>
2122
</modules>
2223

2324
<scm>
@@ -350,7 +351,32 @@
350351
</plugins>
351352
</build>
352353
</profile>
353-
354+
355+
<profile>
356+
<id>jacoco</id>
357+
<activation>
358+
<property>
359+
<name>!no-reports</name>
360+
</property>
361+
</activation>
362+
<build>
363+
<plugins>
364+
<plugin>
365+
<groupId>org.jacoco</groupId>
366+
<artifactId>jacoco-maven-plugin</artifactId>
367+
<version>${jacoco.version}</version>
368+
<executions>
369+
<execution>
370+
<goals>
371+
<goal>prepare-agent</goal>
372+
</goals>
373+
</execution>
374+
</executions>
375+
</plugin>
376+
</plugins>
377+
</build>
378+
</profile>
379+
354380
<profile>
355381
<id>default</id>
356382
<activation>

0 commit comments

Comments
 (0)