[英]jaxb2-maven-plugin not generating sources from wsdl
I have the following configuration for jaxb2-maven-plugin version 2.4 我有jaxb2-maven-plugin版本2.4的以下配置
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceType>wsdl</sourceType>
<sources>
<source>src/main/resources/wsdl/osg_data_sync_service_1_0.wsdl</source>
<source>src/main/resources/wsdl/parlayx_sms_notification_service_2_2.wsdl</source>
</sources>
<outputDirectory>${project.basedir}/src/main/generated</outputDirectory>
<clearOutputDir>false</clearOutputDir>
</configuration>
</plugin>
But when i run mvn jaxb2:xjc
, no classes are generated. 但是当我运行
mvn jaxb2:xjc
,不会生成任何类。
What could I be overlooking? 我能俯瞰什么?
I have pasted one of the wsdl here 我在这里贴了一个wsdl
EDIT 编辑
As it was mentioned that this might be a possible duplicate, I downgraded the plugin to version 1.6
and changed configuration to the following and still no classes generated. 由于有人提到这可能是重复的,我将插件降级到版本
1.6
并将配置更改为以下内容,但仍然没有生成类。
<configuration>
<wsdl>true</wsdl>
<xmlschema>false</xmlschema
<schemaFiles>osg_data_sync_interface_1_0.wsdl,parlayx_sms_notification_interface_2_2.wsdl</schemaFiles>
<schemaDirectory>src/main/resources/wsdl</schemaDirectory>
<outputDirectory>${project.basedir}/src/main/generated</outputDirectory>
</configuration>
Full pom here as site was complaining too much code 全POM 这里作为现场抱怨太多的代码
It finally works with version 1.6
after cleaning. 它最终适用于清洁后的
1.6
版本。 Why does version 2.4
not work? 为什么版本
2.4
不起作用?
Finally got version 2.4
to work. 终于得到
2.4
版了。 I don't know exactly what the issue was but I was able to generate the classes by running mvn generate-sources
instead of mvn jaxb2:xjc
as suggested in the comments . 我不知道究竟是什么问题,但我能够通过运行
mvn generate-sources
而不是mvn jaxb2:xjc
来生成类,如评论中所建议的那样。 I also had to run mvn clean
first 我还必须先运行
mvn clean
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.