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.
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? ]]
Created attachment 29652 [details] sample output of "java-config -l" from a gentoo linux machine
It's rather enhancement than a bug.
http://blogs.sun.com/roller/page/xzajo/20060328 http://nbxdoclet.sourceforge.net/installLibrary.php
Interesting. Fedora Core (starting w/ version 4) also ships with a variety of frequently used open-source libraries, courtesy of jpackage.org. 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.
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.
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.
Would make a fine module for contrib - if it turned out to be well-liked and reliable, could be moved into standard code.
Got discussed again in the netcat 6.0 program. http://www.netbeans.org/servlets/BrowseList?list=netcat&by=thread&from=810085 So you know.
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.
> 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.
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.
> 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 :-)
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?
*** Issue 117892 has been marked as a duplicate of this issue. ***
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 http://wiki.netbeans.org/wiki/view/FaqIvy
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.
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