eclipse 中的 JAXB maven 项目不断给我本地化的错误消息

JAXB maven project in eclipse keeps giving me localized error messages

tl;dr:如何停止使用本地化(德语)错误消息的 Maven?

我在 eclipse 中有一个 Maven 项目,我只用它从 xsds 创建 jaxb 类(使用上下文菜单中的 Run as-> Maven generate-sources)。有一些问题,我正在尝试解决它们,但出于某种原因,我的系统发现用德语给我错误消息是个好主意。这些对于在互联网上寻求帮助根本没有帮助。

我的 Windows 是德语版本,但我的 eclipse 不是,而且我在 pom 中没有指定使用德语的任何地方(我也没有指定使用英语 - 谷歌搜索“maven pom set language " 只告诉我如何指定 java 版本)。

我不知道是否可能,我的 maven 正在将本地化版本的 jars 提取到我的 maven 存储库。如果是这样的话,我希望它停止这样做。

有人知道如何阻止 maven/java/eclipse/jaxb 提供德语错误消息吗?我厌倦了猜测英文文本是什么。

附加信息

我的pom.xml是模仿的。这是 <build> 部分:

<build>
    <plugins>
        <plugin>
            <groupId>org.jvnet.jaxb2.maven2</groupId>
            <artifactId>maven-jaxb2-plugin</artifactId>
            <version>0.12.3</version>
            <executions>
                <execution>
                    <id>generate-schema-statusinformation</id>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                        <generateDirectory>target/msg</generateDirectory>
                        <schemaDirectory>${schemaBaseDir}/xsds/StatusInformation</schemaDirectory>
                        <generatePackage>${schemaBasePackage}.statusinformation</generatePackage>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.3</version>
            <configuration>
                <source>${maven.compiler.source}</source>
                <target>${maven.compiler.target}</target>
            </configuration>
        </plugin>
    </plugins>
</build>

这是我的(匿名)错误输出的一部分,其中包含部分德语文本:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building My-Messages 0.0.1
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-jaxb2-plugin:0.12.3:generate (xxx) @ my-messages ---
[INFO] Up-to-date check for source resources [[file:/C:/xxx/StatusInformation.xsd, file:/C:/xxx/pom.xml]] and taret resources [[]].
[INFO] Sources are not up-to-date, XJC will be executed.
[ERROR] Error while parsing schema(s).Location [ file:/C:/xxx/StatusInformation.xsd{493,60}].
com.sun.istack.SAXParseException2; systemId: file:/C:/xxx/StatusInformation.xsd; lineNumber: 493; columnNumber: 60; Element "Remarks" ist in mehr als einer Eigenschaft vorhanden.
    at com.sun.tools.xjc.ErrorReceiver.error(ErrorReceiver.java:86)
    at com.sun.tools.xjc.reader.ModelChecker.check(ModelChecker.java:92)
...

(这个问题不是为了寻求有关特定错误的帮助,仅针对语言问题)

xjc 包含插入到生成文件中的错误消息和注释的本地化文本资源,因此适用区域设置解析的通常规则。

您的 Java VM 的语言环境由 user.language 系统 属性 定义,它是从 Unix 系统上的 LANG 环境变量初始化的。

(我没有Windows,所以你得自己找对应的设置。)

要覆盖我系统上的德语默认设置,我只需像这样调用 Maven:

LANG=en mvn clean install

当使用运行作为| Eclipse 中的 Maven build,可以在 Maven 启动配置的 Environment 选项卡上设置此环境变量。