when creating a library it would be nice if it
would be possible to link other libraries to the
current one that are also necesary and would be
loaded if the current project doesn't already
contain a reference to the library. For example,
hibernate requires additional libraries to run
other than just the hibernate.jar file. many of
these, such as commons-pool, I already have a
library for and don't want to include it in the
hibernate library. However, now I have to remember
that when I want to use the hibernate library I
have to also use the commons-pool library if I'm
not alrady using it. It would be nice if I could
just say that in addition to the jars the
following libraries also need to be added to the
classpath when I select the hibernate library for
use. I suppose it would be nice to be able to
select projects and jars in the same process. Also
it would be nice when I try to remove a required
library for another selected library to get a
warning about the removal before removing the library.
A note: I just saw
meaning that as of JDK 1.5, javac will honor Class-Path directives in
manifest JARs. Not sure if java will as well. Anyway, may be an
acceptable workaround for some users, assuming the libraries are
collocated (so that Class-Path can use relative URLs). Will not,
however, result in the IDE being aware of the indirect classpath
entries (and thus e.g. making sources available during debugging).
I think I may not have explained exactly what I'm thinking about too
well here. What I'm talking about is when you set up a library you can
select other libraries to include just like you can select jars. The
app would then add these other libraries to the classpath as well when
the main library is selected. It would also tell people that try to
remove a library needed by another library it cannot be removed
without remove the other libraries as well. An example would be I have
a hibernate library created that depends on my commons-logging
library. When I add the hibernate library to my project and
commons-logging is not a selected library it will add the
commons-logging library automatically (maybe with a dialog box stating
that the following libraries will also be added as a result of adding
the hibernate library and list the commons-logging library). If I try
to remove the commons-logging library from the project an error will
pop up saying that to remove the commons-logging library the hibernate
library must first be removed. This way I don't have to include the
commons-logigng jar file in the hibernate library or just not include
it and try to remember that I have to include both libraries whick
could be forgotten pretty easy.
I think the RFE was clear before, but the last summary was especially
precise - thank you.
*** Issue 58940 has been marked as a duplicate of this issue. ***
Related to issue #47507 though not a duplicate. Maven handles this, by the way.
*** Issue 81778 has been marked as a duplicate of this issue. ***
*** Issue 87406 has been marked as a duplicate of this issue. ***
Any progress on this issue? It seems there are two parts to it.
1. Allow Global Libraries to include other Global Libraries, inheriting their included JARs (with attached
source/javadoc settings) and their included Global Libraries recursively.
2. When Project A is added as a Library to Project B, (optionally?) have Project A's Libraries be included in the
classpath for Project B. This may be more difficult since run-time and testing dependencies come into play as well.
Perhaps item 2 should be a separate issue.
As it turns out, item 2 *is* a separate issue: issue 47507.
Item 1 seems fairly trivial, then.
Users needing nontrivial dependency management facilities are advised to use Maven projects.
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