5

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.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
Alessandro Da Rugna
  • 4,571
  • 20
  • 40
  • 64

1 Answers1

6

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 instance en, 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>
Tunaki
  • 132,869
  • 46
  • 340
  • 423