我想使用“ org.jvnet.jaxb2.maven2” maven插件从Web服务生成类。但是在日食中显示如下错误:
Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate failed:
A required class was missing while executing org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate: com/sun/xml/bind/api/ErrorListener
下面是pom片段:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>fpcy.wsdl</generatePackage>
<schemas>
<schema>
<url>{the web sevice url}</url>
</schema>
</schemas>
</configuration>
</plugin>
但是如何将此类添加到我的项目中?
答案 0 :(得分:0)
我找到了自己解决问题的方法: 将jaxb插件工件ID从“ maven-jaxb2-plugin”更改为“ maven-jaxb20-plugin”。请参阅Using-a-Specific-JAXB-Version