views:

66

answers:

2

Hi everybody,

Assume the following project setup in Netbeans

Project A depending on Project B depending on lib/projectBLib.jar

In my current setup, I have to tell Project A that it depends on projectBLib.jar, otherwise it is not loaded. I would have expected Netbeans to handle dependency chains for me (as other IDEs do). So am I doing something wrong, or do I really have to configure this manually for each project?

Thanks for any suggestions, Peter :)

+1  A: 

You can also use Maven and the Maven NB plug-in for this. (If the plug-in is not buggy), when you specify in your Maven pom.xml file that A depends on B, it will do the rest automatically for you.

A. Ionescu
Thanks for your input. Unfortunately, this is an existing project, and I am not planning to move to maven-based building right now. I just do not understand why Netbeans should not honor dependency-chains out of the box... I think it should...
PeterP
@PeterP: there's no need to "move" or to change your project structure - just add an extra pom.xml. From that pom.xml, the Netbeans plug-in (or even plug-ins from other IDEs - IntelliJ 100%) will recognize what it has to do. I'm not a Maven fan at all, but when it comes to "automatic" dependency management, Maven is really good and save allot of time.
A. Ionescu
A: 

You are not doing anything wrong. You must add the lib explicitly.

There is an enhancement request that sounds very similar to the question you have raised: http://netbeans.org/bugzilla/show_bug.cgi?id=47507.

vkraemer
Thanks a lot, vkraemer for enlightenment... However, I am quite surprised, hoped for another answer *sigh*
PeterP