【发布时间】:2012-03-29 15:25:47
【问题描述】:
如何使用 maven 生成剧集?我现在收到一条错误消息:an operand is missing (org.apache.cxf:cxf-xjc-plugin:2.4.0:xsdtojava:generate-sources:generate-sources)
这是我的插件:
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-xjc-plugin</artifactId>
<version>2.4.0</version>
<configuration>
<extensions>
<extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:2.4.0</extension>
</extensions>
</configuration>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>xsdtojava</goal>
</goals>
<configuration>
<xsdOptions>
<xsdOption>
<extension>true</extension>
<xsd>my.xsd</xsd>
<packagename>mypackage</packagename>
<extensionArgs>
<arg>-episode</arg>
</extensionArgs>
</xsdOption>
</xsdOptions>
</configuration>
</execution>
<execution>
<configuration>
<xsdOptions>
<xsdOption>
<extension>true</extension>
<xsd>my.xsd</xsd>
<extensionArgs>
<arg>-Xdv</arg>
</extensionArgs>
</xsdOption>
</xsdOptions>
</configuration>
</execution>
</executions>
编辑:剧集的创建工作正常。在另一个项目中,包含剧集的 jar 文件通过 episodes 属性给出。但我得到一个例外:Error while parsing schema(s).Location [ file:/D:/workspace/XXX/src/test/resources/XXX.xsd{45,32}]. om.sun.istack.SAXParseException2: compiler was unable to honor this conversion customization. It is attached to a wrong place, or its inconsistent with other bindings. nested in com.sun.istack.SAXParseException2: (the above customization is attached to the following location in the schema)
最终产品中包含剧集信息的 xsd。它在该行上有一些 xjc:javaType 适配器参考。这会导致问题吗?
【问题讨论】: