You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Suu Quan <sq...@wwc.com> on 2001/06/20 19:57:15 UTC

javadoc help

I'm trying to understand how to make <javadoc> work.

1. I tried packagenames="..." (pretty much copied from the manual)

<javadoc destdir="docs"
        packagenames="stp" sourcepath="/stp"
        classpathref="classpath" (<-- this one is good, used for other tasks)
        verbose="true"
        author="true"
        version="true"
>
<group title="utils" packages="utils.*;utils/ldap/*;utils/net/*" />
<group title="stputils" packages="stputils.*" />
</javadoc>

I got as output
doc:
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] javadoc: No package, class, or source file found named stp.
  [javadoc] 1 error

2. I've tried 
sourcefiles="**/*.java"

but it is not what is expected: a comma separated list of files. And I have too many to list.

My example is a pretty simple one. Suggestion?

tia

Suu Quan
squan@wwc.com

Re: javadoc help

Posted by "Larry V. Streepy, Jr." <st...@healthlanguage.com>.
Unfortunately on this one I had to read the source code.  The wildcard
(which has to end in .*) is converted to a fileset patter by converting
all '.' to '/' and appending a '*' to the end.  So, my pattern ends up
as a fileset includes="**//**", which matches every package.

However, by looking at the code, your pattern of com.foo.stp.* should
become com/foo/stp/** which should match all files beneath com/foo/stp
in the source directory.  After a quick look at the source, I don't
really see why it wouldn't work for you.  It further refines the matched
directory list by only taking directories that have .java files in them.


Suu Quan wrote:
> 
> > > Is "stp" the actual name of your package?  The example in the doc shows:
> > >  <javadoc packagenames="com.dummy.test.*"
> > >     ...
> > > So I would guess you need to specify the actual package name and
> terminate
> > > it with a wildcard -- eg: com.foo.stp.*
> >
> > No it's not. Actually, it's a group of 3 applications, and 2 packages, all
> > under the same directory tree.
> > I tried to use sourcefiles=**/*.java but it apparently does not accept
> wild
> > card.
> >
> > I'll try Larry's
> > packagenames="**/.*"
> 
> It works (Larry's packagenames with wild cards), but would you please
> explain how? Can't get it from the docs
> 
> tia

-- 
Larry V. Streepy, Jr.
Chief Technical Officer and VP of Engineering

Health Language, Inc.  -- "We speak the language of healthcare"

970/626-5028 (office)           mailto:streepy@healthlanguage.com
970/626-4425 (fax)              http://www.healthlanguage.com

Re: javadoc help

Posted by "Larry V. Streepy, Jr." <st...@healthlanguage.com>.
After some investigation, it seems that the javadoc task does not deal
well with files that are not in a package.  You will have to list the
source files specifically using the sourcefiles attribute, and be aware
that the sourcefiles attribute does NOT take wildcards, it has to be a
comma separated list of source file names.

Suu Quan wrote:
> 
> > > packagenames="**/.*"
> >
> > It works (Larry's packagenames with wild cards
> 
> I verified that only the packages got the docs prepared, not the application
> (the ones not belonging to a package)
> 
> How do I javadoc those too, and the packages as well.
> 
> thks

-- 
Larry V. Streepy, Jr.
Chief Technical Officer and VP of Engineering

Health Language, Inc.  -- "We speak the language of healthcare"

970/626-5028 (office)           mailto:streepy@healthlanguage.com
970/626-4425 (fax)              http://www.healthlanguage.com

Re: javadoc help

Posted by Suu Quan <sq...@wwc.com>.
> > packagenames="**/.*"
>
> It works (Larry's packagenames with wild cards

I verified that only the packages got the docs prepared, not the application
(the ones not belonging to a package)

How do I javadoc those too, and the packages as well.

thks


Re: javadoc help

Posted by Suu Quan <sq...@wwc.com>.
> > Is "stp" the actual name of your package?  The example in the doc shows:
> >  <javadoc packagenames="com.dummy.test.*"
> >     ...
> > So I would guess you need to specify the actual package name and
terminate
> > it with a wildcard -- eg: com.foo.stp.*
>
> No it's not. Actually, it's a group of 3 applications, and 2 packages, all
> under the same directory tree.
> I tried to use sourcefiles=**/*.java but it apparently does not accept
wild
> card.
>
> I'll try Larry's
> packagenames="**/.*"

It works (Larry's packagenames with wild cards), but would you please
explain how? Can't get it from the docs

tia


Re: javadoc help

Posted by Suu Quan <sq...@wwc.com>.
> Is "stp" the actual name of your package?  The example in the doc shows:
>  <javadoc packagenames="com.dummy.test.*"
>     ...
> So I would guess you need to specify the actual package name and terminate
> it with a wildcard -- eg: com.foo.stp.*

No it's not. Actually, it's a group of 3 applications, and 2 packages, all
under the same directory tree.
I tried to use sourcefiles=**/*.java but it apparently does not accept wild
card.

I'll try Larry's
packagenames="**/.*"


Re: javadoc help

Posted by "Larry V. Streepy, Jr." <st...@healthlanguage.com>.
In my build, I didn't need to specify a wild card.  Here are two forms
that I use in our build:

    <javadoc destdir="${build.customer.doc}"
             sourcepath="${src.dir}"
             private="yes"
             classpath="${base.path}"
             header="${name}"
             maxmemory="96m"
             bottom="${copyright}"
             packagenames="com.cyberplus.le.ejb,
                           com.cyberplus.le.ejb.error,
                           com.cyberplus.util,
                           com.cyberplus.le.client.tools,
                           com.cyberplus.le.server.web.servlet"/>

and

    <javadoc destdir="${build.internal.doc}"
             sourcepath="${src.dir}"
             private="yes"
             classpath="${base.path}"
             header="${name}"
             maxmemory="96m"
             bottom="${copyright}"
             packagenames="**/.*"/>


Diane Holt wrote:
> 
> Is "stp" the actual name of your package?  The example in the doc shows:
>  <javadoc packagenames="com.dummy.test.*"
>     ...
> So I would guess you need to specify the actual package name and terminate
> it with a wildcard -- eg: com.foo.stp.*
> 
> Diane
> 
> --- Suu Quan <sq...@wwc.com> wrote:
> > I'm trying to understand how to make <javadoc> work.
> >
> > 1. I tried packagenames="..." (pretty much copied from the manual)
> >
> > <javadoc destdir="docs"
> >         packagenames="stp" sourcepath="/stp"
> >         classpathref="classpath" (<-- this one is good, used for other
> > tasks)
> >         verbose="true"
> >         author="true"
> >         version="true"
> > >
> > <group title="utils" packages="utils.*;utils/ldap/*;utils/net/*" />
> > <group title="stputils" packages="stputils.*" />
> > </javadoc>
> >
> > I got as output
> > doc:
> >   [javadoc] Generating Javadoc
> >   [javadoc] Javadoc execution
> >   [javadoc] javadoc: No package, class, or source file found named stp.
> >   [javadoc] 1 error
> >
> > 2. I've tried
> > sourcefiles="**/*.java"
> >
> > but it is not what is expected: a comma separated list of files. And I
> > have too many to list.
> >
> > My example is a pretty simple one. Suggestion?
> >
> > tia
> >
> > Suu Quan
> > squan@wwc.com
> >
> 
> =====
> (holtdl@yahoo.com)
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/

-- 
Larry V. Streepy, Jr.
Chief Technical Officer and VP of Engineering

Health Language, Inc.  -- "We speak the language of healthcare"

970/626-5028 (office)           mailto:streepy@healthlanguage.com
970/626-4425 (fax)              http://www.healthlanguage.com

Re: javadoc help

Posted by Diane Holt <ho...@yahoo.com>.
Is "stp" the actual name of your package?  The example in the doc shows:
 <javadoc packagenames="com.dummy.test.*"
    ...
So I would guess you need to specify the actual package name and terminate
it with a wildcard -- eg: com.foo.stp.*

Diane

--- Suu Quan <sq...@wwc.com> wrote:
> I'm trying to understand how to make <javadoc> work.
> 
> 1. I tried packagenames="..." (pretty much copied from the manual)
> 
> <javadoc destdir="docs"
>         packagenames="stp" sourcepath="/stp"
>         classpathref="classpath" (<-- this one is good, used for other
> tasks)
>         verbose="true"
>         author="true"
>         version="true"
> >
> <group title="utils" packages="utils.*;utils/ldap/*;utils/net/*" />
> <group title="stputils" packages="stputils.*" />
> </javadoc>
> 
> I got as output
> doc:
>   [javadoc] Generating Javadoc
>   [javadoc] Javadoc execution
>   [javadoc] javadoc: No package, class, or source file found named stp.
>   [javadoc] 1 error
> 
> 2. I've tried 
> sourcefiles="**/*.java"
> 
> but it is not what is expected: a comma separated list of files. And I
> have too many to list.
> 
> My example is a pretty simple one. Suggestion?
> 
> tia
> 
> Suu Quan
> squan@wwc.com
> 


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/