生成文件中的 JAXB 英文注释
JAXB english comments in generated file
我用XJC编译一些XSD到Java类。在我的机器上,而不是通常的评论
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
我得到了相同的评论,但是是意大利语
// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.11
使用 Maven 插件调用 XJC maven-jaxb2-plugin:0.12.0:generate
。
相同的 pom 在不同的机器上生成不同的注释。
如何将评论切换回英文?
我 运行 它在 JDK 1.8.0_66 在 Windows 10 上使用意大利语言环境。
您可以在 <locale>
属性的帮助下指定将在生成 类 期间使用的语言环境。
locale
- Locale used during generation, for instance en
, de
, fr
etc. This will, for instance, influence the language of the generated JavaDoc comments.
默认情况下,maven-jaxb2-plugin
将使用您的用户区域设置。 Sample configuration 对于插件将是:
<configuration>
<locale>en</locale> <!-- this will use the English locale -->
</configuration>
我用XJC编译一些XSD到Java类。在我的机器上,而不是通常的评论
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
我得到了相同的评论,但是是意大利语
// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.11
使用 Maven 插件调用 XJC maven-jaxb2-plugin:0.12.0:generate
。
相同的 pom 在不同的机器上生成不同的注释。
如何将评论切换回英文?
我 运行 它在 JDK 1.8.0_66 在 Windows 10 上使用意大利语言环境。
您可以在 <locale>
属性的帮助下指定将在生成 类 期间使用的语言环境。
locale
- Locale used during generation, for instanceen
,de
,fr
etc. This will, for instance, influence the language of the generated JavaDoc comments.
默认情况下,maven-jaxb2-plugin
将使用您的用户区域设置。 Sample configuration 对于插件将是:
<configuration>
<locale>en</locale> <!-- this will use the English locale -->
</configuration>