Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 51052 - Permit declaration of dependencies among libraries
Permit declaration of dependencies among libraries
Product: projects
Classification: Unclassified
Component: Libraries
All All
: P3 with 1 vote (vote)
Assigned To: Tomas Zezula
: 58940 81778 87406 (view as bug list)
Depends on:
Blocks: 51005
  Show dependency treegraph
Reported: 2004-11-01 20:32 UTC by ghyde
Modified: 2016-07-07 08:37 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description ghyde 2004-11-01 20:32:08 UTC
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.
Comment 1 Jesse Glick 2005-01-12 19:42:54 UTC
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).
Comment 2 ghyde 2005-01-13 18:55:51 UTC
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.
Comment 3 Jesse Glick 2005-01-14 20:37:24 UTC
I think the RFE was clear before, but the last summary was especially
precise - thank you.
Comment 4 Jesse Glick 2005-05-16 17:46:27 UTC
*** Issue 58940 has been marked as a duplicate of this issue. ***
Comment 5 Jesse Glick 2006-12-09 16:15:12 UTC
Related to issue #47507 though not a duplicate. Maven handles this, by the way.
Comment 6 Tomas Zezula 2007-01-10 08:39:54 UTC
*** Issue 81778 has been marked as a duplicate of this issue. ***
Comment 7 Tomas Zezula 2007-09-20 09:15:57 UTC
*** Issue 87406 has been marked as a duplicate of this issue. ***
Comment 8 malfunction84 2008-08-07 22:26:51 UTC
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.
Comment 9 malfunction84 2009-01-27 17:35:29 UTC
As it turns out, item 2 *is* a separate issue: issue 47507.

Item 1 seems fairly trivial, then.
Comment 10 ebresie 2011-02-22 17:26:29 UTC
Any updates?
Comment 11 Jesse Glick 2011-02-25 04:01:25 UTC
Users needing nontrivial dependency management facilities are advised to use Maven projects.
Comment 12 Martin Balin 2016-07-07 08:37:06 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

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo