Skip to content

Commit f95406d

Browse files
author
Maboh Christopher
committed
add -Pcoverage
1 parent e3a78bb commit f95406d

File tree

1 file changed

+98
-95
lines changed

1 file changed

+98
-95
lines changed

pom.xml

Lines changed: 98 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -85,101 +85,104 @@
8585
</dependency>
8686
</dependencies>
8787

88-
<build>
89-
<plugins>
90-
<plugin>
91-
<groupId>org.apache.maven.plugins</groupId>
92-
<artifactId>maven-checkstyle-plugin</artifactId>
93-
<version>3.3.0</version>
94-
<configuration>
95-
<configLocation>${checkstyle.config}</configLocation>
96-
<consoleOutput>true</consoleOutput>
97-
<failsOnError>true</failsOnError>
98-
<failOnViolation>true</failOnViolation>
99-
<violationSeverity>error</violationSeverity>
100-
<linkXRef>false</linkXRef>
101-
</configuration>
102-
<executions>
103-
<execution>
104-
<id>validate</id>
105-
<phase>validate</phase>
106-
<goals>
107-
<goal>check</goal>
108-
</goals>
109-
</execution>
110-
</executions>
111-
</plugin>
112-
<plugin>
113-
<groupId>org.jacoco</groupId>
114-
<artifactId>jacoco-maven-plugin</artifactId>
115-
<version>${jacoco.version}</version>
116-
<executions>
117-
<execution>
118-
<goals>
119-
<goal>prepare-agent</goal>
120-
</goals>
121-
</execution>
122-
<!-- attached to Maven test phase -->
123-
<execution>
124-
<id>report</id>
125-
<phase>test</phase>
126-
<goals>
127-
<goal>report</goal>
128-
</goals>
129-
</execution>
130-
<execution>
131-
<id>jacoco-check</id>
132-
<goals>
133-
<goal>check</goal>
134-
</goals>
88+
<profiles>
89+
<profile>
90+
<id>coverage</id>
91+
<build>
92+
<plugins>
93+
<plugin>
94+
<groupId>org.apache.maven.plugins</groupId>
95+
<artifactId>maven-checkstyle-plugin</artifactId>
96+
<version>3.3.0</version>
13597
<configuration>
136-
<excludes combine.children="append">
137-
<!-- These are reporting false positives that are already being tested elsewhere -->
138-
<exclude>**/SpringBootApp.java</exclude>
139-
</excludes>
140-
<rules>
141-
<rule>
142-
<element>BUNDLE</element>
143-
<limits>
144-
<limit>
145-
<counter>LINE</counter>
146-
<value>COVEREDRATIO</value>
147-
<minimum>85%</minimum>
148-
</limit>
149-
</limits>
150-
</rule>
151-
</rules>
98+
<configLocation>${checkstyle.config}</configLocation>
99+
<consoleOutput>true</consoleOutput>
100+
<failsOnError>true</failsOnError>
101+
<failOnViolation>true</failOnViolation>
102+
<violationSeverity>error</violationSeverity>
103+
<linkXRef>false</linkXRef>
152104
</configuration>
153-
</execution>
154-
</executions>
155-
</plugin>
156-
<plugin>
157-
<groupId>org.cyclonedx</groupId>
158-
<artifactId>cyclonedx-maven-plugin</artifactId>
159-
<version>2.7.9</version>
160-
<executions>
161-
<execution>
162-
<phase>package</phase>
163-
<goals>
164-
<goal>makeAggregateBom</goal>
165-
</goals>
166-
</execution>
167-
</executions>
168-
<configuration>
169-
<projectType>library</projectType>
170-
<schemaVersion>1.4</schemaVersion>
171-
<includeBomSerialNumber>true</includeBomSerialNumber>
172-
<includeCompileScope>true</includeCompileScope>
173-
<includeProvidedScope>true</includeProvidedScope>
174-
<includeRuntimeScope>true</includeRuntimeScope>
175-
<includeSystemScope>true</includeSystemScope>
176-
<includeTestScope>false</includeTestScope>
177-
<includeLicenseText>false</includeLicenseText>
178-
<outputReactorProjects>true</outputReactorProjects>
179-
<outputFormat>all</outputFormat>
180-
<outputName>CycloneDX-Sbom</outputName>
181-
</configuration>
182-
</plugin>
183-
</plugins>
184-
</build>
105+
<executions>
106+
<execution>
107+
<id>validate</id>
108+
<phase>validate</phase>
109+
<goals>
110+
<goal>check</goal>
111+
</goals>
112+
</execution>
113+
</executions>
114+
</plugin>
115+
<plugin>
116+
<groupId>org.jacoco</groupId>
117+
<artifactId>jacoco-maven-plugin</artifactId>
118+
<version>${jacoco.version}</version>
119+
<executions>
120+
<execution>
121+
<goals>
122+
<goal>prepare-agent</goal>
123+
</goals>
124+
</execution>
125+
<execution>
126+
<id>report</id>
127+
<phase>test</phase>
128+
<goals>
129+
<goal>report</goal>
130+
</goals>
131+
</execution>
132+
<execution>
133+
<id>jacoco-check</id>
134+
<goals>
135+
<goal>check</goal>
136+
</goals>
137+
<configuration>
138+
<excludes combine.children="append">
139+
<exclude>**/SpringBootApp.java</exclude>
140+
</excludes>
141+
<rules>
142+
<rule>
143+
<element>BUNDLE</element>
144+
<limits>
145+
<limit>
146+
<counter>LINE</counter>
147+
<value>COVEREDRATIO</value>
148+
<minimum>85%</minimum>
149+
</limit>
150+
</limits>
151+
</rule>
152+
</rules>
153+
</configuration>
154+
</execution>
155+
</executions>
156+
</plugin>
157+
<plugin>
158+
<groupId>org.cyclonedx</groupId>
159+
<artifactId>cyclonedx-maven-plugin</artifactId>
160+
<version>2.7.9</version>
161+
<executions>
162+
<execution>
163+
<phase>package</phase>
164+
<goals>
165+
<goal>makeAggregateBom</goal>
166+
</goals>
167+
</execution>
168+
</executions>
169+
<configuration>
170+
<projectType>library</projectType>
171+
<schemaVersion>1.4</schemaVersion>
172+
<includeBomSerialNumber>true</includeBomSerialNumber>
173+
<includeCompileScope>true</includeCompileScope>
174+
<includeProvidedScope>true</includeProvidedScope>
175+
<includeRuntimeScope>true</includeRuntimeScope>
176+
<includeSystemScope>true</includeSystemScope>
177+
<includeTestScope>false</includeTestScope>
178+
<includeLicenseText>false</includeLicenseText>
179+
<outputReactorProjects>true</outputReactorProjects>
180+
<outputFormat>all</outputFormat>
181+
<outputName>CycloneDX-Sbom</outputName>
182+
</configuration>
183+
</plugin>
184+
</plugins>
185+
</build>
186+
</profile>
187+
</profiles>
185188
</project>

0 commit comments

Comments
 (0)