From 92efe82cf2b1a81fb184e89146119b84e6334a25 Mon Sep 17 00:00:00 2001 From: Tunaki Date: Sun, 28 May 2017 21:16:46 +0200 Subject: [PATCH] Fixing build on Windows cmd.exe. Files generated with the XJC tool were using the platform encoding, that can be different from the project source encoding. In this case, the project source encoding is UTF-8, but cmd.exe can use another (e.g. code page 850). In turn, this created an error while compiling the generated sources because they contain unmappable characters for UTF-8 as expected by the compiler. The encoding that should be used by XJC is specified through the -encoding option. --- maven-failsafe-plugin/pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maven-failsafe-plugin/pom.xml b/maven-failsafe-plugin/pom.xml index ff773c7330..f42e6827bf 100644 --- a/maven-failsafe-plugin/pom.xml +++ b/maven-failsafe-plugin/pom.xml @@ -105,6 +105,10 @@ ../maven-surefire-plugin/src/site/resources/xsd/failsafe-summary.xsd ../maven-surefire-plugin/src/site/resources/xsd/failsafe-summary.xjb org.apache.maven.plugin.failsafe.xmlsummary + + -encoding + ${project.build.sourceEncoding} +