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.
Given 2 projects A and B and a 3rd party X.jar A depends on X.jar B depends on A (and wants by inheritance X.jar at runtime) NetBeans currently does not add A's dependencies to the runtime classpath and therefore it is not possible to run any test cases or main methods in B without explicitly adding X.jar. I request that an option be enabled to inherit runtime dependencies from dependent projects (and that changes in A's classpath are propagated). I would prefer if this were the default behaviour (i.e. like Eclipse and IDEA). The current workaround (adding X.jar to B's runtime classpath) is not a satisfactory solution as it is too easy for a development team to neglect to add a runtime library to all the effected projects. It also takes a lot of effort to add all the libraries manually and keep it up to date!
It could be non-trivial to do in ant. The UI/IDE part should be easier, but still a non trivial addition. Not for 6.1. On a general level dependency transitivity has both pros and cons. Apache Maven has transitive dependencies and users get a different set of problems. 1. how to exclude a certain dependency from transitivity? 2. how to synchronize the dependency tree if a single dependency comes from 2 sources but with different versions? etc. BTW why do you need it on runtime classpath only? what if the project A exposes some classes from X.jar?
> BTW why do you need it on runtime classpath only? what if the project A exposes some classes from X.jar? If A exposes classes from X.jar and B makes use of those classes, then X.jar should be on the compile-time dependency list. In Eclipse there is the possibility to "export" dependencies which means to make them compile-time dependencies to anything higher in the chain. I would welcome such a feature in NetBeans! (Although, getting basic inheritance working is the priority for me).
*** This issue has been marked as a duplicate of 47507 ***