Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Package comments and excluded files

843810Sep 9 2005
I have an ant target to generate javadoc for a whole package structure minus one sub-package and one class, plus a few classes from another package:
  <target name="doc">
    <mkdir dir="${build}/docs/api"/>
    <javadoc destdir="${build}/docs/api/"
      use="true"
      windowtitle="Public API">
      <classpath>
        <path refid="3rdparty.jar.path"/>
      </classpath>
      <fileset dir="${build}">
        <include name="com/company/pkg1/**"/>
        <exclude name="com/company/pkg1/util/**"/>
        <exclude name="com/company/pkg1/server/ServiceMBean.java"/>
        <include name="com/company/pkg2/CustomerReport.java"/>
        <include name="com/company/pkg2/DeprecatedReport.java"/>
        <include name="com/company/pkg2/Report.java"/>
        <include name="com/company/pkg2/TagReport.java"/>
      </fileset>
    </javadoc>
  </target>
This worked fine until I started including package.html files for package documentation. Running this with package.html in com/company/pkg1 gives the following error:
javadoc: Illegal package name: "C:\abc\def\com\company\pkg1\package.html"

After playing around, I found that if I shift the 3 <include> and <exclude> lines referring to pkg1 out of the <fileset> tag and into a <packageset> tag, then the package comments work. However, then the exclude for the individual java class (ServiceMBean.java) does not work. Likewise, shifting the file exclude back to the fileset tag still does not exclude it.

It seems that I must decide whether to have package comments or the ability to exclude individual files, but not both. Is there any way around this?

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 7 2005
Added on Sep 9 2005
0 comments
247 views