【发布时间】:2015-12-03 17:19:37
【问题描述】:
tl;dr:如何使用本地化(德语)错误消息停止 maven?
我在 Eclipse 中有一个 maven 项目,我仅用于从 xsds 创建 jaxb 类(使用上下文菜单中的 Run as-> Maven generate-sources)。有一些问题,我正在尝试解决它们,但由于某种原因,我的系统发现用德语给我错误消息是个好主意。这些对于在互联网上寻求帮助根本没有帮助。
我的 Windows 是德语版本,但我的 eclipse 不是,我没有在 pom 中指定使用德语(我也没有指定使用英语 - 谷歌搜索“maven pom set language”只告诉我如何指定一个 java 版本)。
我不知道是否有可能,我的 maven 正在将 jar 的本地化版本提取到我的 maven 存储库。如果是这样的话,我希望它停止这样做。
有人知道如何阻止 maven/java/eclipse/jaxb 提供德语错误消息吗?我已经厌倦了不得不猜测英文文本会是什么。
附加信息
我的pom.xml 仿照https://stackoverflow.com/a/2857613/1358283。这是<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)
...
(这个问题不是为了寻找特定错误的帮助,只针对语言问题)
【问题讨论】:
标签: java eclipse maven pom.xml