ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 41292] javadoc task: sourcepath for JDK sources broken
Date Sun, 29 Nov 2009 01:18:51 GMT

Robert Simpson <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #2 from Robert Simpson <> 2009-11-28 17:18:49
UTC ---
>> is there another (new?) way to get the desired behaviour?

I finally managed to invent a workaround for getting the {@inheritDoc}
(explicit or implied) to work with Ant. (I had updated bug #47790 before I saw
this one)

I ran into this issue while attempting to create a javadoc task equivalent to
following javadoc command which generates a couple hundred
documentation files

javadoc -private -sourcepath
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/src -source 1.6
-J-Xmx128m -d docs/api src/com/filewise/*.java

As indicated, the following seemingly equivalent task definition "does more" in
it generates several thousand output files including doc for all of the JDK
files (requiring the memory to be increased to -Xmx768m), which takes about 25

<property name="" 
<!-- that property is actually set differently with <whichresource> depending
whether we're on Mac, Linux or Windows -->

<target name="doc" depends="init">
   <javadoc access="protected" destdir="docs/api" source="1.6"
      <packageset dir="src"/>
         <pathelement location="${}"/>

I tried the "don't specify the sourcepath attribute at all" solution, but then
it no
longer picks up the inherited comments from the JDK, which makes sense, since
there's no longer anything to indicate where the JDK source files are.  Thus
all of
the "Description copied from ..." comments disappeared from the output files.

I tried adding "-sourcepath" as an additionalparam, but strangely it thought
was more than one "-sourcepath", until I replaced
"<packageset>" with "<fileset>".  So the final workaround for properly
the "-sourcepath" parameter appears to be:

<target name="doc" depends="init">
   <javadoc access="protected" destdir="docs/api" source="1.6"
maxmemory="768m" additionalparam="-sourcepath ${}">
      <fileset dir="src">
         <include name="*.java"/>
         <include name="**/*.java"/>

It now generates only 250 files and runs in as little as 128m, or with more
takes 25 seconds rather than 25 minutes.

Rob S.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message