I use XJC to compile some XSD to Java classes. On my machine, instead of the usual comment
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
I get the same comment but in italian
// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.11
XJC is invoked with Maven plugin maven-jaxb2-plugin:0.12.0:generate
.
Same pom generates different comments on different machines.
How do I switch comments back to English?
I run it on JDK 1.8.0_66 on Windows 10 with Italian locale.
You can specify a locale that will be used during generation of the classes, with the help of the <locale>
attribute.
locale
- Locale used during generation, for instanceen
,de
,fr
etc. This will, for instance, influence the language of the generated JavaDoc comments.
By default, maven-jaxb2-plugin
will use your user locale. Sample configuration for the plugin would be:
<configuration>
<locale>en</locale> <!-- this will use the English locale -->
</configuration>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With