Suppose a set of simple projects, A, B, C, each needing to use the same common project Z. All parts are under ongoing development.
So we add project Z as a library to A, B and C.
As example details: Class A has a single method, main(). Class Z is a simple JFrame-based form. Z includes NB IDE's default main() to instantiate the form, so it can be run separately, but, in example use, A.main() calls Z.main() to show the form.
This works fine for a simple form in class Z.
However, suppose we add components to class Z's form from SwingX or other non-standard libraries. This auto adds corresponding library dependencies to project Z. We can test Z by running Z.main() directly -- works fine. However if we now recompile and run A.main(), an exception is thrown: can't find the SwingX (or whatever) library.
This can be made to work by adding Z's dependencies also to A. So the issue appears to be that this mechanism to add some project as a library doesn't take care of adding the dependencies of that other library/project.
What's the right solution to this?
Netbeans 7.2, using ANT.
May be a duplicate of these similar questions that lack checked answers: