我想在我的camel maven项目中使用cxf-codegen-plugin来生成带有wsdl 2 java的源代码。
我添加了如下插件到我的pom.
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<wsdlOptions>
<wsdlOption>
<wsdl>src/main/resources/wsdl/BookService.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
这会在pom中引发错误...
Execution generate-sources of goal org.apache.cxf:cxf-codegen-plugin:3.2.4:wsdl2java failed: A required class was missing while executing org.apache.cxf:cxf-codegen-
plugin:3.2.4:wsdl2java: javax/xml/bind/annotation/adapters/HexBinaryAdapter ----------------------------------------------------- realm = plugin>org.apache.cxf:cxf-codegen-
plugin:3.2.4 strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy urls[0] = file:/C:/esb/.m2/repository/org/apache/cxf/cxf-codegen-plugin/3.2.4/cxf-codegen-
plugin-3.2.4.jar urls[1] = file:/C:/esb/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar urls[2] = file:/C:/esb/.m2/repository/org/codehaus/plexus/plexus-
archiver/1.2/plexus-archiver-1.2.jar ...
我尝试了其他示例项目,如https://github.com/sigreen/camel-cxf-soap-client,并在pom中得到了类似的错误,因为我确信它在2015年提交此项目时工作,我假设它是今天的版本不匹配。
如果有人有一个最近的项目与cxf-codegen-plugin这将有助于。
2条答案
按热度按时间2g32fytz1#
我不断地根据错误堆栈中的细节进行修改,这些细节随着每次修改而不断变化。
c8ib6hqw2#
我把我的jdk版本从11改成了8,它对我很有效