wsdl2java ant 任务:如何在 java 文件注释中包含 wsdl 文件名
我们使用 axis-wsdl2java ant 任务从 WSDL 描述生成 Java 文件。
<axis-wsdl2java url="${src.dir.etc}/wsdl/BLAH.wsdl"
output="${build.dir.generated_src}" timeout="240000"
testcase="false" verbose="true" skeletondeploy="false"
serverside="false" debug="false" helpergen="false">
是否可以在生成的 Java 文件中包含原始 WSDL 文件名或路径作为注释?已创建一条注释,说明该文件是从 WSDL 生成的,但没有说明是哪个 WSDL 文件。
更新:为了澄清问题,生成的文件当前包含如下注释:
/**
* [FILENAME].java
*
* This file was auto-generated from WSDL
* by the Apache Axis [DATE] WSDL2Java emitter.
*/
We're generating Java files from WSDL descripitons using the axis-wsdl2java ant task.
<axis-wsdl2java url="${src.dir.etc}/wsdl/BLAH.wsdl"
output="${build.dir.generated_src}" timeout="240000"
testcase="false" verbose="true" skeletondeploy="false"
serverside="false" debug="false" helpergen="false">
Is it possible to include the original WSDL file name or path in the generated Java file as a comment? A comment is already created stating the fact that the file was generated from a WSDL, but it does not say which WSDL file.
UPDATE: To clarify the question, the generated files currently include a comment like this:
/**
* [FILENAME].java
*
* This file was auto-generated from WSDL
* by the Apache Axis [DATE] WSDL2Java emitter.
*/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不认为这个蚂蚁任务支持做这样的事情。
但通过使用 ReplaceRegExp 任务,我想您可以在生成文件后执行此操作。我想这样的东西可以工作(只需快速编写就需要工作才能使其工作)
I don't think that the this ant task supports doing something like this.
But by using the ReplaceRegExp Task I guess you could do this after the files have been generated. I imagine something like this could work (just a quick write up will need work to get it to work)