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 74474 - [60cat] Prepopulation of Library Manager from system JARs
Summary: [60cat] Prepopulation of Library Manager from system JARs
Alias: None
Product: projects
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 5.x
Hardware: All Linux
: P3 blocker with 1 vote (vote)
Assignee: Tomas Zezula
: 117892 (view as bug list)
Depends on:
Reported: 2006-04-06 08:32 UTC by _ hair
Modified: 2016-07-07 08:38 UTC (History)
4 users (show)

See Also:
Exception Reporter:

sample output of "java-config -l" from a gentoo linux machine (10.45 KB, text/plain)
2006-04-06 08:33 UTC, _ hair

Note You need to log in before you can comment on or make changes to this bug.
Description _ hair 2006-04-06 08:32:00 UTC
Many machines have a existing repository of java libraries installed on their
machines. Especially on *nix machines it is usually under /usr/share/

It would be nice for the Library Manager to be able to scan this directory and
automatically install all the java libraries already on the machine ready to use
inside the IDE.

On Gentoo linux this becomes even easier as the java libraries are listable
through the command "java-config -l".
I've uploaded an example of output from this command.

I would be willing to help out (or even do it myself) if how such a thing should
be done (which APIs to use) could be shown.

[[ Is it even possible to edit the Library Manager via the command line? ]]
Comment 1 _ hair 2006-04-06 08:33:38 UTC
Created attachment 29652 [details]
sample output of "java-config -l" from a gentoo linux machine
Comment 2 Jiri Prox 2006-04-06 10:46:06 UTC
It's rather enhancement than a bug.
Comment 4 Jesse Glick 2006-04-07 17:20:45 UTC
Interesting. Fedora Core (starting w/ version 4) also ships with a variety of
frequently used open-source libraries, courtesy of Not clear how
best to arrange these into named libraries. Gentoo's system looks easier to use.
Of course Maven's repository is the best around.

You can definitely create libraries the hard way by generating the right XML
files into the system filesystem. This would be a pretty simple module to write.
Whether you can do it more prettily using some provider interface, I'm not sure.
Comment 5 Tomas Zezula 2006-04-10 09:31:42 UTC
I will try to create an add on module which creates libraries from java-config.
Also Suse Linux has several java libraries installed in the /usr/share/java
folder, but it has nothing like java-config.
Comment 6 _ hair 2007-09-24 12:27:00 UTC
Another nice addition would be to parse the user's .m2/repository directory, if it exists, and populate the library
manager with all the maven artifacts the user has already downloaded via maven builds.
Comment 7 Jesse Glick 2007-09-26 17:51:35 UTC
Would make a fine module for contrib - if it turned out to be well-liked and reliable, could be moved into standard code.
Comment 8 _ hair 2007-10-04 11:54:25 UTC
Got discussed again in the netcat 6.0 program.
So you know.
Comment 9 Milos Kleint 2007-10-04 12:51:47 UTC
the maven repository content can turn quite big. The Libraries UI is not designed for it.

Additionally any automatic conversion will have bad noise ratios. Not everything there is in the maven repo you want as
a separate library. Eg. you want struts or tapestry as single library with multiple jars. It's impossible to pick out
the "important" artifact-turn-library items correctly in an automated fashion.
Comment 10 _ hair 2007-10-04 13:03:41 UTC
> Not everything there is in the maven repo you want as a separate library.

Really? Apart from the all the different classifiers and versions in the repository, i'd like to be able to have the
full list of libraries to choose from rather than none.

But more importantly i'm interested in what java-config has to offer since it likely has more "library" related stuff
beyond just binaries like javadoc and sources. It was just that this is really only gentoo based, and that a scan of
/usr/share is really only linux based. While a .m2/repository scan is much more os independent.

Milos, i would be interested in hearing any ideas on how to better achieve it, as you are the owner to mevenide.
Comment 11 Milos Kleint 2007-10-04 13:20:10 UTC
the central maven repo has 20k+ artifacts, your local repo can easily accumulate 1000+ of artifacts. That's 1000 entries
in Libraries dialog to choose from.

A better approach would be to allow the user to create Library based on a Maven artifact ID. That way everyone only
creates stuff that he/she needs. The IDE can allow to browse the repo content, search, or manual entry of the ID. Then
it downloads everything to the local disk and creates the Library instance in the IDE, populated with binaries, javadoc
and sources.
Comment 12 _ hair 2007-10-04 13:25:03 UTC
> The IDE can allow to browse the repo content, search, or manual entry of the ID. Then
> it downloads everything to the local disk and creates the Library instance in the IDE, populated with binaries, javadoc
> and sources

nice :-)
Comment 13 _ hair 2007-10-04 13:27:53 UTC
Any smart way of then connecting "Libraries" from a mevenide project to the libraries in the Library Manager?
 Would it also be possible to on demand create them in the library manager to satisfy the above connection?
Comment 14 Milos Kleint 2007-10-05 12:21:26 UTC
*** Issue 117892 has been marked as a duplicate of this issue. ***
Comment 15 Jesse Glick 2007-11-15 15:07:38 UTC
Probably a more sensible approach, for people who cannot or will not simply use Maven projects (for which Library
Manager is irrelevant), would be to add Ivy support for library resolution. For a quick-and-dirty approach, see
Comment 16 Milos Kleint 2009-02-25 08:44:56 UTC
just FYI, the 6.7 M3 maven repository browser will allow creating an IDE library from the maven repository content. Not
connected to the library manager UI yet though.
Comment 17 Martin Balin 2016-07-07 08:38:58 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss