Skip to content

Commit 84d102d

Browse files
Updated jacoco coverage report to run in test phase. Closes #88.
1 parent 419a7a1 commit 84d102d

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Changed JavadocPackage check to warning
1010
* Changed EmptyForIteratorPad check to warning as IntelliJ code formatting does not currently allow for this
1111
* Added a new checkstyle config file bt-checkstyle-format-only.xml for projects that only want to check basic code formatting.
12+
* Modified the jacoco report goal to the test phase and to make sure it runs after surefire, moved the jacoco plugin after the surefire plugin in the pom file which is how maven determines the run order of plugins defined on the same phase #88
1213

1314
## 1.0.19
1415
* Added bt.qa.fail property as a convenience property to allow projects to fail builds or only report QA violations. #84

qa-parent/pom.xml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@
182182

183183
<build>
184184
<plugins>
185+
186+
<!-- Surefire -->
187+
<plugin>
188+
<groupId>org.apache.maven.plugins</groupId>
189+
<artifactId>maven-surefire-plugin</artifactId>
190+
<version>${bt.surefire.plugin.version}</version>
191+
</plugin>
192+
185193
<!-- Code coverage. -->
186194
<plugin>
187195
<groupId>org.jacoco</groupId>
@@ -196,23 +204,17 @@
196204
</goals>
197205
</execution>
198206
<!-- Jacoco Coverage Report -->
207+
<!-- As this is bound to the same phase as surefire but needs to run after surefire it must be defined after the surefire plugin. -->
199208
<execution>
200209
<id>post-unit-test</id>
201-
<phase>prepare-package</phase>
210+
<phase>test</phase>
202211
<goals>
203212
<goal>report</goal>
204213
</goals>
205214
</execution>
206215
</executions>
207216
</plugin>
208217

209-
<!-- Surefire -->
210-
<plugin>
211-
<groupId>org.apache.maven.plugins</groupId>
212-
<artifactId>maven-surefire-plugin</artifactId>
213-
<version>${bt.surefire.plugin.version}</version>
214-
</plugin>
215-
216218
<!-- Verify: Check the code style. -->
217219
<plugin>
218220
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)