Skip to content

Commit 245ad38

Browse files
committed
build: properly fix JaCoCo report generation.
Fix #1239
1 parent 0aed10d commit 245ad38

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

pom.xml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,15 @@
494494
https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-dependencies/pom.xml
495495
-->
496496
<properties>
497+
<!--
498+
Workaround for a bug in surefire plugin: it doesn't respect sourceEncoding
499+
and doesn't pass it into a forked process.
500+
See: https://stackoverflow.com/questions/17656475/maven-source-encoding-in-utf-8-not-working
501+
502+
Note: don't put this property within surefire-maven-plugin as it would break jacoco-maven-plugin.
503+
-->
504+
<argLine>-Dfile.encoding=${project.build.sourceEncoding} -Xss256k</argLine>
505+
497506
<!-- Redefine default value from spring-boot-dependencies -->
498507
<assertj.version>3.14.0</assertj.version>
499508

@@ -955,12 +964,6 @@
955964
<configuration>
956965
<skipTests>${skipUnitTests}</skipTests>
957966
<disableXmlReport>${disableXmlReport}</disableXmlReport>
958-
<!--
959-
Workaround for a bug in surefire plugin: it doesn't respect sourceEncoding
960-
and doesn't pass it into a forked process.
961-
See: https://stackoverflow.com/questions/17656475/maven-source-encoding-in-utf-8-not-working
962-
-->
963-
<argLine>-Dfile.encoding=${project.build.sourceEncoding} -Xss256k</argLine>
964967
</configuration>
965968
</plugin>
966969

0 commit comments

Comments
 (0)