This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 46901 - Generate Javadoc for Project action fails
Summary: Generate Javadoc for Project action fails
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL: http://issues.apache.org/bugzilla/sho...
Keywords:
Depends on: 47066 50548
Blocks: 41537
  Show dependency tree
 
Reported: 2004-08-04 15:42 UTC by Jan Pokorsky
Modified: 2006-03-24 10:29 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pokorsky 2004-08-04 15:42:23 UTC
* run ide on jdk1.4
* have a project with jdk1.5 platform
* have sources using generics
* generate javadoc for project

It seems that the ide uses javadoc from the
default platform (jdk1.4) regardless the project's
platform.
Comment 1 Jesse Glick 2004-08-04 18:43:18 UTC
Tomas please check it.
Comment 2 Tomas Zezula 2004-08-04 19:16:42 UTC
It seems that the javadoc target does not use active platform, but
uses the default one. Which is not right when the default platform is
older than the active one.
Can be fixed in the xslt generating the build-impl.xml
Comment 3 Jesse Glick 2004-08-10 03:31:22 UTC
I think Tomas is on vacation. I will see if I can fix it.
Comment 4 Jesse Glick 2004-08-10 18:29:00 UTC
Unfortunately there is no way to specify a different executable to
<javadoc>. May have to use <exec>.
Comment 5 Jesse Glick 2004-08-10 19:19:31 UTC
<apply> that is. Hmm. There is no way to tell Ant's <javadoc> to use a
different binary (I checked in Ant source code). There is no way to
tell javadoc to use an impl from a different JDK (confirmed by
experiment and by Sun JDK tool docs re. -bootclasspath option). And
there is no clean way that I know of, short of using a custom task
that duplicates much of what <javadoc> does, to conditionally pass
some arguments to the foreign javadoc executable, such as -use or
-author, based on whether some properties are set. Maybe can use <arg
line="..."> tricks, will see.
Comment 6 Jesse Glick 2004-08-10 20:30:01 UTC
Well, have it working. Ugly as sin though.

Will file separate bug for web projects: issue #47066.
Comment 7 Jesse Glick 2004-08-10 22:20:15 UTC
committed   * Up-To-Date  1.10       
java/j2seplatform/src/org/netbeans/modules/java/j2seplatform/wizard/J2SEWizardIterator.java
committed   * Up-To-Date  1.27       
java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl
Comment 8 Jesse Glick 2004-08-11 23:39:49 UTC
RFE for Ant to make such a hack unnecessary:

http://issues.apache.org/bugzilla/show_bug.cgi?id=30606
Comment 9 Jan Pokorsky 2004-08-12 10:57:23 UTC
It does not work. At least on ms win.

Output log:

init:
Loading source file D:\tmp\projects\JavaDocTest15\src\org\m\List.java...
1 error
javadoc: error - Illegal package name: "D:\tmp\projects\JavaDocTest15\src"
D:\tmp\projects\JavaDocTest15\nbproject\build-impl.xml:386: apply
returned: 1
BUILD FAILED (total time: 0 seconds)

-----------------------------------
It refers to line
 <apply parallel="true" failonerror="true"
executable="${platform.javadoc}">
Comment 10 Jesse Glick 2004-08-12 20:10:04 UTC
Well I don't have a Win32 machine to test it on at the moment. Anyone
else (Petr, Tomas) willing to take a look at why it fails on Win? As
far as I know the options are the same as on Unix.
Comment 11 Petr Hrebejk 2004-08-13 10:30:26 UTC
Tomas implemented that. He sould decide. IMO what should be not
disabled is to drag package into it's own source group root and into
any of it't parents.

Tomas plase take care of it.
Comment 12 Petr Hrebejk 2004-08-13 10:34:49 UTC
Ooops, please ognore my last comment it was about another bug. Sorry.
Comment 13 Jesse Glick 2004-08-13 20:42:25 UTC
I think I have it. Windows is too dumb to pass an empty string
(${javac.classpath}) as a separate parameter.
Comment 14 Jesse Glick 2004-08-14 01:22:38 UTC
I think this fixes it; someone with Windows please reopen or verify as
appropriate. (I have a Windows box to do some tests on, but with 96Mb
I can barely run the IDE; mostly have to do command-line script tests.)

committed     Up-To-Date  1.28       
java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl
Comment 15 Jan Pokorsky 2004-09-09 12:32:31 UTC
Verified, it works now.
Comment 16 Jesse Glick 2005-03-29 18:24:42 UTC
Ant #30606 fixed for Ant 1.7. Still TBD when we will be able to use the fix in
NB. Probably not for a while, unfortunately.
Comment 17 Jesse Glick 2005-03-30 17:04:00 UTC
Ant #30606 merged to 1.6.3, so whenever we upgrade to that we could fix
j2seproject to use the new attribute. This would mean that the project could not
run on Ant 1.6.2, however. Or the stylesheet could look for

  <minimum-ant-version>1.6.3</minimum-ant-version>

Unfortunately the Ant script itself cannot yet specify what version it needs:

http://issues.apache.org/bugzilla/show_bug.cgi?id=32804