You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Doug Bateman <do...@middleware-company.com> on 2000/05/23 22:02:19 UTC

JavaDoc Troubles

Dear Ant Team,

I've just recently discovered ant, and I am quite impressed with it.
Presently, I am using the April 18, 2000 release build of Ant, and I am
having the following problem I'm hoping you can shed some light on.

I have the target:

  <property name="estore.src" value="."/>
  <property name="estore.dest" value="../build/weblogic"/>
  <property name="estore.javadocs" value="${estore.dest}/docs/api"/>
  <target name="javadocs">
    <mkdir dir="${estore.javadocs}"/>
    <javadoc packagenames="com.ordertrust.estore.* com.sun.estore.util.*"
             sourcepath="${estore.src}/common/java:${estore.src}/weblogic/java">
             classpath="${estore.classpath}" 
             destdir="${estore.javadocs}"
             author="true"
             version="true"
             use="true"
             private="true"
             windowtitle="Java Pet Store Demo API"
             doctitle="Java Pet Store Demo"
    />
  </target>

The directory names included in the sourcepath do infact exist and
contain the proper .java files.  The packagenames are also correct.
However, the way I'm listing multple values in these fields may not
be.  I am encountering two errors:

Error 1) If I include two values in the source path, I get this error.

BUILD FATAL ERROR: Path .\common\java;.\weblogic\java does not exist.

Error 2) If I only use one value in the source path, but two in the
packagenames attribute, I get this error:

Generating Javadoc
Parsing source files for packages
Javadoc execution
[error] javadoc: No packages or classes specified.


I imagine there are two possible causes for this problem.

a) I'm not using the right seperators for including multiple values
(and I've experimented with quite a few).  I've checked the
ant documentation, and it hasn't shed any light on this.

b) Ant doesn't support multiple directories in the source path and
multiple packages in the packagenames attribute.

If it's (b), then I can simple fall back on exec'ing the commandline
version of javadoc.  Or I'd even be willing to help write the code for the
fix.  If it's (a) though, then I'd rather simply fix my mistake.

Any help you can provide would be greatly appreciated.
Doug

-- 
In this world of change, nothing which comes stays,
and nothing which goes is lost.

                                    Anne Swetchine (1782-1857)


RE: JavaDoc Troubles

Posted by Doug Bateman <do...@middleware-company.com>.
> First, when used with the ".*", sourcepath is interpreted as a single folder
> expected to contain all packages.
> ...
> It looks like you have two separate source paths for your packages ...
> looking at the source for the JavaDoc task, it looks like it will work for
> you ONLY if you explicitly list all the package names (don't use the .* at
> the end).

Ah, that would explain a few things.  I'd be willing to devote a little
time to fixing this as it seams simple enough.  But first I've got to go
read all the FAQ's on how to contribute.

In the meantime, I'll just use <copydir> to merge them into one directory,
and then javadoc that.  That should get the public release of the port of
Java Petstore to Weblogic out the door.

> Second, the separator for packagenames is a comma.

Sure enough, I just tried the comma and it works.  So this means the the
ANT documentation needs to be updated to reflect this.  Currently the
documentation says packagenames should be a:
   "Space separated list of package files (with terminating wildcard)"
That's at least what it says as of the April 18, 2000 release build.

Thanks for your help,
Doug

-- 
In this world of change, nothing which comes stays,
and nothing which goes is lost.

                                    Anne Swetchine (1782-1857)


RE: JavaDoc Troubles

Posted by Jason Sando <js...@think1up.com>.
> I have the target:
>
>     <javadoc packagenames="com.ordertrust.estore.* com.sun.estore.util.*"
>
> sourcepath="${estore.src}/common/java:${estore.src}/weblogic/java">
>


Strange timing, I'm looking at the same issues right now.

First, when used with the ".*", sourcepath is interpreted as a single folder
expected to contain all packages.

Second, the separator for packagenames is a comma.

It looks like you have two separate source paths for your packages ...
looking at the source for the JavaDoc task, it looks like it will work for
you ONLY if you explicitly list all the package names (don't use the .* at
the end).

Hope that helps,

-j