【发布时间】:2017-10-31 14:57:08
【问题描述】:
我正在尝试使用 Java 8 构建一个 Confluence 插件。它可以使用 Java 7 正确构建。它使用 jaxb2-maven-plugin,其中定义的执行之一是目标“schemagen”和阶段“generate-resources”正在抛出此错误:
[ERROR] Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:2.3.1:schemagen (restTypes) on project bb-team-plugin:
Execution restTypes of goal org.codehaus.mojo:jaxb2-maven-plugin:2.3.1:schemagen failed:
syntax error @[1,1] in file: MY_WORKDIR/target/generated-sources/jaxb/META-INF/sun-jaxb.episode -> [Help 1]
我拥有的绑定文件:
<jxb:bindings jxb:version="1.0" jxb:extensionBindingPrefixes="xjc"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
<jxb:globalBindings>
<xjc:simple />
</jxb:globalBindings>
</jxb:bindings>
在 maven 中使用 -e 或 -X 不会抛出任何额外有用的输出,在执行配置中使用会抛出 SAXParseException 警告和上述相同的错误。
我已将我的 sun-jaxb.episode 与其他示例(如本网站 https://github.com/highsource/maven-jaxb2-plugin/wiki/Using-Episodes)进行了比较,它具有完全相同的结构,其中没有任何异常。
知道会发生什么吗?
【问题讨论】:
标签: java jaxb jaxb2 jaxb2-maven-plugin schemagen