jaxb
  1. jaxb
  2. JAXB-1001

Cannot pass language for generated Javadoc

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.2.7
    • Fix Version/s: None
    • Component/s: xjc
    • Labels:
      None

      Description

      Content of Javadoc depends on the locale of the developer machine. E.g., in my case it is de_DE but I need the language of the generated content to be in English. I cannot pass -Duser.language=en. Please add as switch to make this controlable.

        Activity

        Hide
        Iaroslav Savytskyi added a comment -

        I think the easiest way is to change user locale to English just before calling xjc. And if you need - you can switch it back afterwards.

        Show
        Iaroslav Savytskyi added a comment - I think the easiest way is to change user locale to English just before calling xjc. And if you need - you can switch it back afterwards.
        Hide
        Iaroslav Savytskyi added a comment -

        If this solution is acceptable I'm going to close the issue.

        Show
        Iaroslav Savytskyi added a comment - If this solution is acceptable I'm going to close the issue.
        Hide
        Michael Osipov added a comment - - edited

        Actually, I can't. I do not use xjc directly but the JAXB Maven Plugin. I do not intend to modify Maven's environment just for one plugin.

        Show
        Michael Osipov added a comment - - edited Actually, I can't. I do not use xjc directly but the JAXB Maven Plugin. I do not intend to modify Maven's environment just for one plugin.
        Hide
        puce added a comment - - edited

        Any workaround for this in a Jenkins started Maven build using the org.jvnet.jaxb2.maven2:maven-jaxb2-plugin Maven plugin?

        Show
        puce added a comment - - edited Any workaround for this in a Jenkins started Maven build using the org.jvnet.jaxb2.maven2:maven-jaxb2-plugin Maven plugin?
        Hide
        puce added a comment -

        This issue still persists and is very annoying. Any news?

        Show
        puce added a comment - This issue still persists and is very annoying. Any news?
        Hide
        Michael Osipov added a comment -

        puce, no changes from Oracle.

        Show
        Michael Osipov added a comment - puce , no changes from Oracle.
        Hide
        lexi added a comment -

        I've added the feature in the `maven-jaxb2-plugin`, see [MAVEN-JAXB2-PLUGIN-87].
        Would be actually nice if XJC would have an option to switch the locale. I don't know how to do it with the command-line XJC. When calling it via java -jar then it should be possible via -Duser.language and co., but for the xjc.exe? No idea.

        Show
        lexi added a comment - I've added the feature in the `maven-jaxb2-plugin`, see [MAVEN-JAXB2-PLUGIN-87] . Would be actually nice if XJC would have an option to switch the locale. I don't know how to do it with the command-line XJC. When calling it via java -jar then it should be possible via -Duser.language and co., but for the xjc.exe? No idea.
        Hide
        e11k added a comment -

        How can I change the locale just before calling xjc? I've tried exporting environment variables such as:

        export JAVA_ARGS="-Duser.language=en -Duser.region=US"
        export LANG="en_US.UTF-8"
        export LC_ALL="en_US.UTF-8"
        

        but the xjc command still generates source files with my machine's locale. Any ideas what I should try next?

        Show
        e11k added a comment - How can I change the locale just before calling xjc? I've tried exporting environment variables such as: export JAVA_ARGS="-Duser.language=en -Duser.region=US" export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8" but the xjc command still generates source files with my machine's locale. Any ideas what I should try next?

          People

          • Assignee:
            Iaroslav Savytskyi
            Reporter:
            Michael Osipov
          • Votes:
            7 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated: