是否可以在maven中使用apache cxf将Web服务客户端代码生成到特殊包中?
我正在尝试在动态构建项目后生成 Web 服务客户端。目前它是这样做的,但将其放入基于 WS 命名空间命名的包中。所以让我们假设命名空间是 google.com ,生成的文件将位于 com.google 中..
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.2.10</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${basedir}/src/main/java/</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>http://localhost:8080/ProjectName/ProjectWS?wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
我想将文件生成到不同的包中..让我们将其称为 comWS.gooleClient
可以这样做吗?
谢谢
I am trying to generate the webservices client once i build my project on the fly .. It currently does so but put it in package named based on the namespace of the WS.. so lets assume the name space is google.com , the generated files would be in com.google ..
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>2.2.10</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${basedir}/src/main/java/</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>http://localhost:8080/ProjectName/ProjectWS?wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
I want to generate the files to a different package.. lets call it comWS.gooleClient
Is it possible to do that?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
可以使用自定义绑定或传递
-p
额外参数,如下所示:It is possible using a custom binding or passing the
-p
extra argument as shown below:虽然我迟到了,但这个规范对我有用
I am very late though , but this specification worked for me
你尝试过这个额外参数吗?
例子:
Did you try this for extraarg?
Example: