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 70497

Summary: Cannot add Javadoc to project jar
Product: projects Reporter: tkellerer <tkellerer>
Component: LibrariesAssignee: Milos Kleint <mkleint>
Severity: blocker CC: alexlamsl, gsporar, jrojcek, mkleint, pbw
Priority: P3 Keywords: API, API_REVIEW_FAST
Version: 5.x   
Hardware: All   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: relevant changes, both API and implementation

Description tkellerer 2005-12-16 11:08:30 UTC
When I have a specific set of libraries (jar files) for one project that I
include e.g. through the "Libraries folder" during the project definition, or by
default because they are located in WEB-INF/lib I cannot attach the related
JavaDocs to those .jar files. 

As e.g. a WebApp is self contained, I do not want to create NB Libraries through
the Library Manager only to be able to view the JavaDocs for a single .jar file
that is contained in one single project (I use NB Libraries for libs that I
share across Projects, not for project specific libraries)
Comment 1 Tomas Zezula 2005-12-16 12:48:48 UTC
This is related to shareable libraries. The shareabe libraries as currently
designed will allow user to create shared library stored in the project (or
elsewhere). You will need to create a library either, but not the global IDE
library as in NB 5.0. Probably the UI should help you to do it or hide it when
you add a jar/folder into your project's classpath.

Comment 2 tkellerer 2005-12-16 18:56:11 UTC
>> "The shareabe libraries as currently designed" 
Are we talking about 5.0 or is this > 5.0?

Actually I think a "Javadoc" tab in the project properties would be perfectly
sufficient, there is no need to make this overly complex. 
Comment 3 tomzi 2006-01-17 10:44:08 UTC
Do you have a link to a mailinglist thread to how this shareable libraries will

It would be a good idea to have these libraries. But it should be possible to
just annotate exisiting .jar's (in WEB-INF/lib) with source code and javadoc, by
e.g. right-click on .jar:
  - add javadoc or add source
  - make/create shareable library

Other projects could just automatcally detect and annotate source code and
javadoc on behalf of the hashcode of the original .jar file. So i don't have to
do this in every project again...
Comment 4 pbw 2006-03-22 09:05:43 UTC
Does this issue relate to free-form projects?
Comment 5 Jesse Glick 2006-03-22 17:00:38 UTC
pbw: re. relationship to freeform projects: probably the same story. Assuming
you are already using the JAR successfully in your project, the only option in
NB 5.0 is to go to Library Manager, make a new library (name irrelevant)
pointing to that JAR location, and add Javadoc. Then you should get Javadoc
associated with it. The main problems are (1) this is awkward and unintuitive;
(2) even if the Javadoc happens to be located inside the project dir or
otherwise accessible via a relative path, you cannot share this association with
colleagues - they have to do the same setup on their own machines.
Comment 6 _ alexlamsl 2006-04-16 15:02:33 UTC
It is indeed rather unintuitive - sharable libraries would be a good idea.

The easiest solution would be to bind these libraries to projects only, but 
one might want to minimise the number of duplicated libraries opened in the 
IDE, in which case sticking to the present solution of Library Manager might 
be desirable. However, this may give rise to namespace conflict issues.

Another issue that might be undesirable is the overall package size - packing 
3rd party libraries into your project might significantly increase the overall 
size of your project.

So if there is an online mechanism (similar to Maven's repository) to store 
and distribute relevant libraries and only package those not on the public 
repository (less popular / dev / pricate modules) with your project, which is 
global and local scopes respectively might be a good solution
Comment 7 tprochazka 2006-04-17 12:38:33 UTC
I wrote my similar idea here:
Comment 8 Milos Kleint 2008-01-14 14:16:52 UTC
Created attachment 55031 [details]
relevant changes, both API and implementation
Comment 9 Milos Kleint 2008-01-14 14:22:36 UTC
attached is the proposed patch. please review
Comment 10 Milos Kleint 2008-01-29 15:07:03 UTC
additional changes in api were required due to high priority issue with previous implementation. (#126023, #126023)

Please review.
Comment 11 Milos Kleint 2008-03-20 14:54:46 UTC
thanks for review
Comment 12 Milos Kleint 2008-03-20 14:55:22 UTC