将 javadoc 移植到 ant 任务:如何实现“[@files]”选项?
我正在尝试将 javadoc 添加到我的 ant 构建过程中,但实际上并不知道如何将 javadoc 的一个选项“转换”为 ant 任务“< javadoc >”。 这里是javadoc用法:
usage: javadoc [options] [packagenames] [sourcefiles] [@files]
这是我已经尝试过的:
<javadoc sourcefiles="build/sourcefiles.txt">
</javadoc>
我想在我的ant任务中使用选项[@files],但找不到正确的方法......你有什么想法吗?
提前致谢...
I'm trying to add javadoc to my ant build process do not really have an idea how to "convert" one option of javadoc into the ant task "< javadoc >".
Here the javadoc usage:
usage: javadoc [options] [packagenames] [sourcefiles] [@files]
This is what I already tried:
<javadoc sourcefiles="build/sourcefiles.txt">
</javadoc>
And I want to have the option [@files] in my ant task, but could not find a proper way to do so...may you have any idea?
Thanks in advance...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最简单(原始)的方法是使用 arg 子元素来提供更多命令行参数。
但我认为这种方式行不通,因为 javadoc 任务至少需要给出所需的属性。
要从文件中获取文件列表,
filelist
资源集合与loadfile
任务可能会有所帮助:实际上,packagelist 属性可能是你想要什么:
首先尝试这个(我不确定它是否也接受那里的文件名)。
The simplest (primitive) way would be to use the
arg
subelement to supply more command line arguments.But I suppose that this will not work this way, since the
javadoc
task wants at least the required attributes to be given.To take a list of files from a file, the
filelist
resource collection together with theloadfile
task may help:Actually, the packagelist attribute might be what you want:
Try this first (I'm not sure if it also accepts file names there).
当它可用时为什么要移植它?
http://ant.apache.org/manual/Tasks/javadoc.html
Why port it when it is available?
http://ant.apache.org/manual/Tasks/javadoc.html