scaladoc Ant 任务为多个源目录编写?

发布于 2024-09-11 10:14:29 字数 891 浏览 2 评论 0原文

我希望在一个同时包含 scala 和 java 的项目中编译 scaladoc 和 javadoc 。该项目有多个源目录(每个目录可能有 scala 或 javadoc)。我尝试过:

  <scaladoc destdir="doc">
    <classpath refid="compile.classpath"/>

    <src>
      <fileset dir="src"/>
      <fileset dir="tweetstream4j/src"/>
    </src>

    <include name="src/**/*.scala"/>
  </scaladoc>

及其几种变体。对于上述变体,我得到:

BUILD FAILED
/blah/build.xml:119: /blah/src/com/foo/Blah.java is not a directory.

其中“Blah.java”是我的源代码树中的一个文件。

我查看了 scaladoc ant 任务文档scaladoc 手册页。我正在使用 scala2.7.7final (因为这是 apt-get 在我的 Ubuntu 系统上安装的)。

关于如何从“src”和“tweetstream4j/src”中获取scaladoc和javadoc的建议?

I wish to compile scaladoc and javadoc in a project with both scala and java in it. The project has more than one source directory (each of which may have scala or javadoc). I tried:

  <scaladoc destdir="doc">
    <classpath refid="compile.classpath"/>

    <src>
      <fileset dir="src"/>
      <fileset dir="tweetstream4j/src"/>
    </src>

    <include name="src/**/*.scala"/>
  </scaladoc>

and several variants thereof. For the above variant I get:

BUILD FAILED
/blah/build.xml:119: /blah/src/com/foo/Blah.java is not a directory.

where "Blah.java" is a file in my source tree.

I've looked at the scaladoc ant task doc and the scaladoc man page. I'm using scala2.7.7final (because that's what apt-get puts on my Ubuntu system).

Suggestions of how to get scaladoc and javadoc out of "src" and "tweetstream4j/src"?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

对你再特殊 2024-09-18 10:14:29

我有同样的问题并遇到了这个。这些 元素似乎没有很好的文档记录,但我能够从网上找到的各种示例中整理出一些有用的东西:

<scaladoc destdir="doc">
    <classpath refid="compile.classpath"/>
    <src path="src"/>
    <src path="tweetstream4j/src"/>
    <include name="**/*.java"/>
    <include name="**/*.scala"/>
</scaladoc>

这将在所有 Java 和 Scala 的源目录中查找编写代码并为其构建一套文档。

I had the same question and came across this. Those <src> elements don't seem well documented but I was able to put together something that works from various examples I found on the web:

<scaladoc destdir="doc">
    <classpath refid="compile.classpath"/>
    <src path="src"/>
    <src path="tweetstream4j/src"/>
    <include name="**/*.java"/>
    <include name="**/*.scala"/>
</scaladoc>

That will look in both source directories for all Java and Scala code and build one set of documentation for it all.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文