Bug 32114 - javadoc package specifications
Summary: javadoc package specifications
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.6.2
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-08 10:12 UTC by Phil Weighill-Smith
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Weighill-Smith 2004-11-08 10:12:35 UTC
It would be very useful if the javadoc task supported selection of packages 
implicitly from the set of classes defined in the nested fileset (to avoid 
getting other packages being listed as empty - I just don't want them to 
appear at all).
Comment 1 Stefan Bodewig 2004-11-18 10:48:38 UTC
Can't you use a <packageset> instead of a <fileset>?
Comment 2 Phil Weighill-Smith 2004-11-18 14:36:34 UTC
The problem I have is that I'm running a doclet that only generates Javadoc for
specifically annotated classes. I don't want to have to maintain an explicity
defined packageset as developers are very likely to forget to update this when
adding new classes that have this annotation.

What I want to do is define the fileset to use a selector that only lists the
source files that have the specific annotation within them and only have the
packages that those files exist within get generated to the final Javadoc output.
Comment 3 Dominique Devienne 2004-11-18 15:52:17 UTC
I guess I don't understand... From you description, looks like you have your 
own doclet that processes some annotated classes. What have packages have to do 
with that? I do something similar (as shown below), the doclet gets a bunch of 
classes, that's all. If your doclet wants to additionally organize the classes 
it receives in packages, then simply do it, no?

Or maybe you want to look into taglets instead of doclets? --DD

    <javadoc source="1.4" public="true">
      <doclet name="com/lgc/buildmagic/util/BeanInfoDoclet">
        <path> <!-- the classpath to load the doclet --> ... </path>
        <param name="-manifest" value="${beaninfo}/beans.xml" />
      </doclet>

      <fileset dir="src">
        <include name="com/lgc/infra/**/*.java" />
        <contains text="@beaninfo.class" />
      </fileset>

      <classpath refid="classpath" />
    </javadoc>
Comment 4 Phil Weighill-Smith 2004-11-26 12:46:40 UTC
Our doclet is a very slight "modification" of the standard doclet that simply
knows to include or exclude classes from the javadoc (and inheritance hierarchy
by "pulling down" methods from "hidden" classes into "visible" specializations)
so that we can describe our classes in a manner appropriate for "public" use. We
also want to include the package.html for those packages that contain "visible"
classes.

I didn't write our doclet so can't say for sure whether we can do what you
suggest. Having the ability in Ant to specify packages via the set of packages
for the selected classes or via a selector seems like a generally useful feature
anyway.