[英]How do I configure axis2-java2wsdl-maven-plugin to use multiple classes to generate one wsdl?
[英]How to configure Multiple .wsdl in CXF Maven Plugin
在以下示例中,我能够配置 WSDL。
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<!-- for myService1.wsdl -->
<wsdlOption>
<wsdl>${basedir}/src/main/wsdl/myService1.wsdl</wsdl>
</wsdlOption>
<!-- for myService2.wsdl -->
<wsdlOption>
<wsdl>${basedir}/src/main/wsdl/myService2.wsdl</wsdl>
</wsdlOption>
. . .
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
但我的问题是,如果我有 100 个或更多 WSDL 那么我需要添加 100 个或更多次。
是否有任何通用方法可以在 pom.xml 文件中多次避免这种情况。
<wsdlRoot>
元素可以指定为使用多个 wsdl 而无需显式引用它们。
<includes>
可用于进一步 select <wsdlRoot>
下的 wsdls
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlRoot>${basedir}/src/main/resources/wsdl</wsdlRoot>
<includes>
<include>*Service.wsdl</include>
</includes>
</configuration>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.