JAXB: How to generate English Javadoc

in windows command line:

> SET JAVA_TOOL_OPTIONS=-Duser.language=en -Duser.country=US -Dfile.encoding=UTF-8
> xjc .

tested with jdk9


You can pass arbitrary properties to XJC using the args/arg element in the configuration of the maven-jaxb2-plugin:

<configuration>
    <extension>true</extension>
    <args>
        <arg>-Duser.language=en</arg>
    </args>
</configuration>

These arguments will be just passed to XJC.

However I have no idea if -Duser.language=en -Duser.country=US are the right options. Anyway the args/arg will be passed to XJC. If it does not work please file an issue here.

Disclaimer: I'm the author of maven-jaxb2-plugin.

Update

This feature is implemented in the version 0.10.0. Now you can do the following:

        <plugin>
            <groupId>org.jvnet.jaxb2.maven2</groupId>
            <artifactId>maven-jaxb2-plugin</artifactId>
            <configuration>
                <locale>es</locale>
            </configuration>
        </plugin>