You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Boué (JIRA)" <ji...@apache.org> on 2017/05/28 19:39:04 UTC

[jira] [Updated] (SUREFIRE-1375) Fixing build on Windows cmd.exe

     [ https://issues.apache.org/jira/browse/SUREFIRE-1375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Boué updated SUREFIRE-1375:
-------------------------------------
    Description: 
The Failsafe Plugin uses {{cxf-xjc-plugin}}, and the XJC tool, to generate files from an XSD. Currently, those files are written with the platform encoding, that can be different from the project source encoding. 

In a Windows environment, on the command prompt, we can have {{chcp}} telling us it's using code page 850. In turn, this creates an error while compiling the generated sources because they contain unmappable characters for UTF-8 as expected by the compiler.

{noformat}
[INFO] --- maven-compiler-plugin:3.6.1:compile (compile-generated) @ maven-failsafe-plugin ---
[INFO] Changes detected - recompiling the module!
...
[ERROR] C:\...\maven-surefire\maven-failsafe-plugin\target\generated-sources\jaxb\org\apache\maven\plugin\failsafe\xmlsummary\ObjectFactory.java:[2,16] error: unmappable character for encoding UTF-8
{noformat}

The encoding that should be used by XJC is specified through the {{-encoding}} option and should be set to the project source encoding.

[Pull request #151|https://github.com/apache/maven-surefire/pull/151].

  was:
The Failsafe Plugin uses {{cxf-xjc-plugin}}, and the XJC tool, to generate files from an XSD. Currently, those files are written with the platform encoding, that can be different from the project source encoding. 

In a Windows environement, on the command prompt, we can have {{chcp}} telling us it's using code page 850. In turn, this creates an error while compiling the generated sources because they contain unmappable characters for UTF-8 as expected by the compiler.

{noformat}
[INFO] --- maven-compiler-plugin:3.6.1:compile (compile-generated) @ maven-failsafe-plugin ---
[INFO] Changes detected - recompiling the module!
...
[ERROR] C:\...\maven-surefire\maven-failsafe-plugin\target\generated-sources\jaxb\org\apache\maven\plugin\failsafe\xmlsummary\ObjectFactory.java:[2,16] error: unmappable character for encoding UTF-8
{noformat}

The encoding that should be used by XJC is specified through the {{-encoding}} option and should be set to the project source encoding.

[Pull request #151|https://github.com/apache/maven-surefire/pull/151].


> Fixing build on Windows cmd.exe
> -------------------------------
>
>                 Key: SUREFIRE-1375
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1375
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Failsafe Plugin
>    Affects Versions: 2.20
>            Reporter: Guillaume Boué
>            Assignee: Guillaume Boué
>
> The Failsafe Plugin uses {{cxf-xjc-plugin}}, and the XJC tool, to generate files from an XSD. Currently, those files are written with the platform encoding, that can be different from the project source encoding. 
> In a Windows environment, on the command prompt, we can have {{chcp}} telling us it's using code page 850. In turn, this creates an error while compiling the generated sources because they contain unmappable characters for UTF-8 as expected by the compiler.
> {noformat}
> [INFO] --- maven-compiler-plugin:3.6.1:compile (compile-generated) @ maven-failsafe-plugin ---
> [INFO] Changes detected - recompiling the module!
> ...
> [ERROR] C:\...\maven-surefire\maven-failsafe-plugin\target\generated-sources\jaxb\org\apache\maven\plugin\failsafe\xmlsummary\ObjectFactory.java:[2,16] error: unmappable character for encoding UTF-8
> {noformat}
> The encoding that should be used by XJC is specified through the {{-encoding}} option and should be set to the project source encoding.
> [Pull request #151|https://github.com/apache/maven-surefire/pull/151].



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)